Yesterday, nobody contributed anything.  :-(
The official answer is: floor(sqrt(x + 2)) + 1