#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
const double eps = 1e-8;
const double PI = acos(-1.0);
const int N = 1415;
const int mod = 998244353;
const int inf = 0x3f3f3f3f;

int f[N];

int main() {
    for(int i = 0; i < N; ++i) f[i] = i * (i + 1) / 2;
    int t, n;
    scanf("%d", &t);
    while(t--) {
        scanf("%d", &n);
        int stp = 0;
        while(n > 0) n -= ++stp;
        if(n == -1) stp++;
        printf("%d\n", stp);
    }
    return 0;
}
