n = int(input()) a = list(map(int, input().split())) max = 0 for i in a: x = i ** (1/2) if int(x) != x: if i > max: max = i print(max)