#include using namespace std; using ll = long long; const ll MOD = 1000000007; using P = pair; #define rep(i, n) for(int i = 0; i < n; i++) #define all(x) (x).begin(),(x).end() int main(){ int t; cin >> t; rep(i,t){ ll n; cin >> n; ll be = 0, en = 1000000001; while(en-be>1){ ll md = (be + en) / 2; if(md*md > n) en = md; else be = md; } cout << be << endl; } return 0; }