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