#include<bits/stdc++.h>
#include <cmath>
using namespace std;
#define ll long long
int main()
{
int t;
scanf("%d",&t);
while(t--)
{
ll b;
scanf("%lld",&b);
ll a=sqrt(b)-10;
if(a<0) a=0;
while(a*a<=b)
{
a++;
}
printf("%lld\n",a-1);
}
return 0;
}

京公网安备 11010502036488号