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

const int MAXN = 5e5;

void s(){
	int k; cin >> k;
	int active = 0, n = 1;
	while(active < k){
		int s = 1;
		while(s * s < n) ++ s;
		if(s * s != n) ++ active;
		++ n;
	}
	cout << n - 1 << endl;
}

int main(){
	int t; cin >> t; while(t --) s();
}
