#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define mk make_pair
#define mod 998244353
#define ll long long
#define lb lower_bound
#define ub upper_bound
#define endl "\n"
#define ff first
#define ss second
#define prec(y,x) fixed<<setprecision(y)<<x
#define inf 1e18
#define pi 3.1415926535

int32_t main()
{
	ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
	
	ll t;
	cin>>t;
	ll ans=0;vector<int> v;
	for(ll i=1;i<=1e5;i++)
	{
		ll u=i*i;
		ll a=i;
		if(u%2==0)
			continue;
		u--;
		ll b=u/2;
		ll c=b+1;
		if(a<=b)
			v.pb(c);
	}
	while(t--)
	{
		ll n;
		cin>>n;
		auto it=upper_bound(v.begin(),v.end(),n);
		ll ans=it-v.begin();
		cout<<ans<<endl;
	}
	return 0;
}