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