n=int(input().strip()) s=1 f=False for i in range(n): if s>1000000: print('>1000000') f=True break s*=int(input().strip())
if f!=True: print(s)