import java.io.*; import java.util.*; class Main { public static void main(String args[])throws Exception { BufferedReader bu=new BufferedReader(new InputStreamReader(System.in)); StringBuilder sb=new StringBuilder(); int t=Integer.parseInt(bu.readLine()); while(t-->0) { long n=Long.parseLong(bu.readLine()); long l=1,r=(int)1e9,mid,ans=l; while(l<=r) { mid=(l+r)>>1; if(mid*mid<=n) { ans=mid; l=mid+1; } else r=mid-1; } sb.append(ans+"\n"); } System.out.print(sb); } }