Buggy python submission (verdict: Time Limit Exceeded):
x1 = input()
x2 = [int(i) for i in input().split(" ")]

result = 1
for xv in x2:
  result = xv * result

if 10**18 < result : result = -1
print(result) 


Fixed submission:
x1 = input()
x2 = [int(i) for i in input().split(" ")]

result = 0
if 0 in x2:
  None 
else:
  result = 1
  for xv in x2:
     result = xv * result
  
     if 10**18 < result : 
        result = -1
        break


print(result)

Buggy python submission (verdict: Time Limit Exceeded):
x1 = input()
x2 = [int(i) for i in input().split(" ")]

result =  1
for xv in x2:
  result = xv * result

if 10**18 < result : result = -1
print(result) 


Fixed submission:
x1 = input()
x2 = [int(i) for i in input().split(" ")]

result = 0
if 0 in x2:
  None 
else:
  result = 1
  for xv in x2:
     result = xv * result
  
     if 10**18 < result : 
        result = -1
        break


print(result)

Buggy python submission (verdict: Time Limit Exceeded):
x1 = input()
x2 = [1]*int(x1)

for k,v in enumerate(input().split(" ")):
    x2[k] = int(v)

result =  1
for xv in x2:
  result = xv * result

if 10**18 < result : result = -1
print(result) 


Fixed submission:
x1 = input()
x2 = [int(i) for i in input().split(" ")]

result = 0
if 0 in x2:
  None 
else:
  result = 1
  for xv in x2:
     result = xv * result
  
     if 10**18 < result : 
        result = -1
        break


print(result)

Buggy python submission (verdict: Time Limit Exceeded):
x1 = input()
x2 = list(map(int, input().split(" ")))
 
result =  1
for xv in x2:
  result = xv * result

if 10**18 < result : result = -1
print(result) 


Fixed submission:
x1 = input()
x2 = [int(i) for i in input().split(" ")]

result = 0
if 0 in x2:
  None 
else:
  result = 1
  for xv in x2:
     result = xv * result
  
     if 10**18 < result : 
        result = -1
        break


print(result)

Buggy python submission (verdict: Time Limit Exceeded):
x1 = input()
x2 = [int(s) for s in input().strip().split(" ") ]
 
result =  1
for xv in x2:
  result = xv * result

if 10**18 < result : result = -1
print(result) 


Fixed submission:
x1 = input()
x2 = [int(i) for i in input().split(" ")]

result = 0
if 0 in x2:
  None 
else:
  result = 1
  for xv in x2:
     result = xv * result
  
     if 10**18 < result : 
        result = -1
        break


print(result)

Buggy python submission (verdict: Time Limit Exceeded):
x1 = input()
x2 = [int(s) for s in input().strip().split(" ") ]
 
result =  1
for x in x2:
  result *= x 

if 10**18 < result :
  result = -1

print(result) 


Fixed submission:
x1 = input()
x2 = [int(i) for i in input().split(" ")]

result = 0
if 0 in x2:
  None 
else:
  result = 1
  for xv in x2:
     result = xv * result
  
     if 10**18 < result : 
        result = -1
        break


print(result)

Buggy python submission (verdict: Time Limit Exceeded):
x1 = input()
x2 = [int(s) for s in input().strip().split(" ") ]
 
result =  1
for x in x2:
  result *= x 

if 10**18 < result :
  print(-1)
else:
  print(result) 


Fixed submission:
x1 = input()
x2 = [int(i) for i in input().split(" ")]

result = 0
if 0 in x2:
  None 
else:
  result = 1
  for xv in x2:
     result = xv * result
  
     if 10**18 < result : 
        result = -1
        break


print(result)

Buggy python submission (verdict: Time Limit Exceeded):
x1 = input()
x2 = [int(s) for s in input().strip().split(" ") ]
 
result =  1
for x in x2:
   result *= x 

if 10**18 < result :
 print(-1)
else:
 print(result) 


Fixed submission:
x1 = input()
x2 = [int(i) for i in input().split(" ")]

result = 0
if 0 in x2:
  None 
else:
  result = 1
  for xv in x2:
     result = xv * result
  
     if 10**18 < result : 
        result = -1
        break


print(result)

Buggy python submission (verdict: Time Limit Exceeded):
x1 = input()
x2 = [int(s) for s in input().strip().split(" ") ]
 
result =  1
for x in x2:
   result *= x 

if 10**18 < result :
 print(-1)
else:
 print(result) 


Fixed submission:
x1 = input()
x2 = [int(i) for i in input().split(" ")]

result = 0
if 0 in x2:
  None 
else:
  result = 1
  for xv in x2:
     result = xv * result
  
     if 10**18 < result : 
        result = -1
        break


print(result)

Buggy python submission (verdict: Time Limit Exceeded):
x1 = input()
x2 = [int(s) for s in input().strip().split(" ") ]
 
if len(x2) >0 :
   result =  1
else :
   result =  0

for x in x2:
   result *= x 

if 10**18 < result :
 print("-1")
else:
 print(result) 


Fixed submission:
x1 = input()
x2 = [int(i) for i in input().split(" ")]

result = 0
if 0 in x2:
  None 
else:
  result = 1
  for xv in x2:
     result = xv * result
  
     if 10**18 < result : 
        result = -1
        break


print(result)

Buggy python submission (verdict: Time Limit Exceeded):
x1 = input()
x2 = [int(s) for s in input().split(" ") ]

if len(x2) >0 :
  result =  1
else :
  result =  0
for x in x2:
  result *= x 

if 10**18 < result :
  print (-1)
else:
  print (result)

Fixed submission:
x1 = input()
x2 = [int(i) for i in input().split(" ")]

result = 0
if 0 in x2:
  None 
else:
  result = 1
  for xv in x2:
     result = xv * result
  
     if 10**18 < result : 
        result = -1
        break


print(result)