P15913 [HackerEarth] Joy is a short and lazy guy, he uses elevator to reach his flat. But unfortunately elevator is not working today and he became sad. Suddenly God came and made the stairs magical, such th
普及-
题目描述

Joy is a short and lazy guy, he uses elevator to reach his flat. But unfortunately elevator is not working today and he became sad. Suddenly God came and made the stairs magical, such that he can jump on it in a magical way. Initially he can take 1 or 2 steps. If he jumps x steps at a time then in the next step he can climb either x or x+1 steps depending on his choice and he must reach exactly on n'th step. Help him find the minimum number of jumps to be made.

INPUT

First line will contain t, total number of test case
Next t lines contains n (total number of steps).

0<t ≤ 100

0<n ≤ 10^5

OUTPUT

Minimum steps to reach the stairs.
Register for IndiaHacksSAMPLE INPUT
2
2
3

SAMPLE OUTPUT
1
2

Register for IndiaHacks

输入格式

见题面

输出格式

见题面

样例输入
10 71 8497 6364 6530 9199 5754 1508 9388 6992 4494
样例输出
11 129 112 113 135 106 54 136 117 94