from math import sqrt, floor def main(): T = int(input()) for _ in range(T): print(floor(sqrt(int(input())))) if __name__ == "__main__": main()