import math
t = int(input())
while t > 0 :
n = int(input())
m = int((math.sqrt(1+8*n)-1)/2)
o = int(m*(m+1)/2)
n -= o
if n < 1 :
print(m)
else:
print(m+1)
t = t-1
aW1wb3J0IG1hdGgKCnQgPSBpbnQoaW5wdXQoKSkKCndoaWxlIHQgPiAwIDoKICAgIG4gPSBpbnQoaW5wdXQoKSkKCiAgICBtID0gaW50KChtYXRoLnNxcnQoMSs4Km4pLTEpLzIpCgogICAgbyA9IGludChtKihtKzEpLzIpCgogICAgbiAtPSBvCgogICAgaWYgbiA8IDEgOgogICAgICAgIHByaW50KG0pCiAgICBlbHNlOgogICAgICAgIHByaW50KG0rMSkKICAgIHQgPSB0LTE=