#include using std::cin; using std::cout; using ll = long long; ll mySqrt(ll x) { if (x == 0) return 0; ll res = exp(0.5 * log(x)); return ((res + 1) * (res + 1) <= x ? res + 1 : res); } int main() { int t; cin >> t; while (t--) { ll n; cin >> n; ll ans = mySqrt(n); cout << ans << '\n'; } return 0; }