Finding a solution for quadratic inequality

Given $r$ and $t$, Is there a way to find the maximum positive integer $N$ such that:

$$2 N^2 + (2r+3)N + (2r+1) \leq t$$

I want to write a program to solve that inequality without brute-force. At least the program should be as fast as possible.

-

Use the quadratic formula and floor the result(s):

In standard form: $0 = ax^2 + bx + c$

$a = 2$

$b = (2r + 3)$

$c = (2r + 1 - t)$

-
I tried but I didn't get the correct answer for r = 1 and t = 10. Answer should be 2 and I got 1. –  Osama Gamal Apr 27 '13 at 21:42
For $r=1$ and $N=1$ the LHS is exactly 10, so 1 is the right answer. –  thesamet Apr 27 '13 at 21:44
I guess I got the wrong inequality from the beginning :) Thanks –  Osama Gamal Apr 27 '13 at 21:47