#include <cstdio>
#include <iostream>
#include <math.h>
using namespace std;
int main(){
	freopen("Weighing.in","r",stdin);
	long t,n;
	cin >>t;
	for (int i=0; i<t; i++){
		cin>>n;
		cout<<floor(sqrt((long double)n))<<"\n";
	}
return 0;
}