def is_square(x): return int(x**0.5)**2 == x input() print(sum(is_square(int(i)) for i in input().split()))