#include <stdio.h>
#include <math.h>
int main() {
    long long a, b;
    scanf("%lld",&a);
    while (scanf("%lld",&b) != EOF) {
        long long result = sqrt(b);
        while (result * result > b) result--;
        printf("%lld\n",result);
    }
    return 0;
}