#include <bits/stdc++.h>
using namespace std;

int main() {
	
	int t , x , k;
	
	cin >> t;
	
	while(t--)
	{
	    cin >> x;
	    
	    k = (int)(sqrt(8 * x + 1)) / 2;
	     
	     
	    if((k * (k + 1) - 2 * x)!=2 && (k * (k + 1) - 2 * x) >= 0)
	      cout << k << "\n";
	      
	    else
	      cout << k + 1 << "\n"; 
	    
	    
	}
	
		
	return 0;
}