#include "bits/stdc++.h" #define int long long using namespace std; using ll = long long; using P = pair; const ll INF = (1LL << 61); ll mod = 998244353; signed main() { ios::sync_with_stdio(false); cin.tie(0); int T; cin >> T; for (int _ = 0; _ < T; _++) { int N; cin >> N; long double t = sqrtl(N); for (int j = t - 20; j <= t + 20; j++) { if (j >= 0 && (j + 1) * (j + 1) > N) { cout << j << endl; break; } } } return 0; }