n=int(input()) count=1 for i in range (n): a=int(input()) count*=a if count>1000000: print(">1000000") else: print(count)