Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int, input().split()))
total = 1
for i in a:
  total = total * i
  
if total > 10**18:
    print("-1")
else:
  print(total)


Fixed submission:
n = int(input())
l = list(map(int, input().split()))
if 0 in l:
  print(0)
  exit()
ans = 1
for i in range(n):
  ans *= l[i]
  if ans > 10**18:
    ans = -1
    break
print(ans)

Buggy python submission (verdict: Runtime Error):
n = int(input())
a = list(map(int, input().split()))
totoal = 1
for i in a:
  total = total * a
  if total > 10**18:
    print("-1")

print(total)


Fixed submission:
n = int(input())
l = list(map(int, input().split()))
if 0 in l:
  print(0)
  exit()
ans = 1
for i in range(n):
  ans *= l[i]
  if ans > 10**18:
    ans = -1
    break
print(ans)

Buggy python submission (verdict: Runtime Error):
n = int(input)
l = list(map(int, inpupt().split()))
if 0 in l:
  print(0)
  exit()
total = 1
for i in range(n):
  total *= l[i]
  if total > 10 ** 18:
    total = -1
    break
print(total)

Fixed submission:
n = int(input())
l = list(map(int, input().split()))
if 0 in l:
  print(0)
  exit()
ans = 1
for i in range(n):
  ans *= l[i]
  if ans > 10**18:
    ans = -1
    break
print(ans)

Buggy python submission (verdict: Runtime Error):
n = int(input())
a = list(map(int, input().split()))
 
if 0 in a:
  print(0)
  exit()
total = 1 
for i in range(n):
  total * = a[i]
  if total > 10 ** 18:
    print(-1)
    break
  
print(total)

Fixed submission:
n = int(input())
l = list(map(int, input().split()))
if 0 in l:
  print(0)
  exit()
ans = 1
for i in range(n):
  ans *= l[i]
  if ans > 10**18:
    ans = -1
    break
print(ans)

Buggy python submission (verdict: Runtime Error):
n = int(input())
a = list(map(int, input().split()))
 
if 0 in a:
  print(0)
  exit()
total = 1 
for i in range(n):
  total * = a[i]
  if total > 10 ** 18:
  	print(-1)
  	break
print(total)

Fixed submission:
n = int(input())
l = list(map(int, input().split()))
if 0 in l:
  print(0)
  exit()
ans = 1
for i in range(n):
  ans *= l[i]
  if ans > 10**18:
    ans = -1
    break
print(ans)

Buggy python submission (verdict: Runtime Error):
n = int(input())
a = list(map(int, input().split()))
 
if 0 in a:
  print(0)
  exit()
total = 1 
for i in range(n):
  total * = a[i]
  if total > 10 ** 18:
  ans = -1
  break
print(total)



Fixed submission:
n = int(input())
l = list(map(int, input().split()))
if 0 in l:
  print(0)
  exit()
ans = 1
for i in range(n):
  ans *= l[i]
  if ans > 10**18:
    ans = -1
    break
print(ans)

Buggy python submission (verdict: Runtime Error):
n = int(input())
a = list(map(int, input().split()))

if 0 in a:
  print(0)
  exit()
total = 1 
for i in range(n):
  total* = a[i]
  if total > 10 ** 18:
  print(-1)
  break
print(total)
  


Fixed submission:
n = int(input())
l = list(map(int, input().split()))
if 0 in l:
  print(0)
  exit()
ans = 1
for i in range(n):
  ans *= l[i]
  if ans > 10**18:
    ans = -1
    break
print(ans)

Buggy python submission (verdict: Runtime Error):
n = int(input())
a = list(map(int, input().split()))
total = 1
 
if 0 in a:
  print(0)
  exit()
 
for i in range(n):
  total* = a[i]
  if total > 10 ** 18:
  print(-1)
  break
print(total)
  

Fixed submission:
n = int(input())
l = list(map(int, input().split()))
if 0 in l:
  print(0)
  exit()
ans = 1
for i in range(n):
  ans *= l[i]
  if ans > 10**18:
    ans = -1
    break
print(ans)

Buggy python submission (verdict: Runtime Error):
n = int(input())
a = list(map(int, input().split()))
total = 1

if 0 in a:
  print(0)
  exit()

for i in range(n):
  total* = a[i]
  if total > 10** 18
  print(-1)
  break
print(total)
  
         


Fixed submission:
n = int(input())
l = list(map(int, input().split()))
if 0 in l:
  print(0)
  exit()
ans = 1
for i in range(n):
  ans *= l[i]
  if ans > 10**18:
    ans = -1
    break
print(ans)