# include<bits/stdc++.h> 
# include<vector>
using namespace std;
using ll=long long;

int main()
{
     int t;
    cin >> t;

    while (t--) {
        int n;

        cin >> n;
        int ans = 0;
        for (int i = 1; i <= n;i++){
            int sum = i * (i + 1) / 2;
            if(sum>=n){
                sum = sum - n;
                if(sum==0||sum>=2){
                    ans = i;
                    break;
                }
                else{
                    ans = i + 1;
                    break;
                }
            }
            else
                continue;
        }

        cout<<ans<<endl;
    }

   return 0;
} 
