#include <bits/stdc++.h>

typedef long long LL;

LL cal(int x) {
    return 1ll * x * (x + 1) / 2;
}

int main() {

    int T;
    scanf("%d", &T);
    while(T--) {
        int x;
        scanf("%d", &x);
        int l = 1, r = x;
        while(l < r) {
            int mid = (l + r) >> 1;
            if(cal(mid) >= x) {
                r = mid;
            }
            else {
                l = mid + 1;
            }
        }
        if(cal(r) - 1 == x) ++r;
        printf("%d\n", r);
    }


    return 0;
}
