#include using namespace std; int t; long long x,n; int main(){ ios_base::sync_with_stdio(false); cin.tie(nullptr); cin>>t; while (t--){ cin>>n; long long x=sqrtl(n); while ((x+1)*(x+1)<=n){ x++; } while (x*x>n){ x--; } cout << x << '\n'; } return 0; }