Buggy python submission (verdict: Runtime Error):
N=int(input())
L=list(map(int,input().split()))
A=1
for i in range(N):
  A=A*L[i]
  if 10**18&lt;A:
    print(-1)
    exit()
print(A)

Fixed submission:
N=int(input())
L=list(map(int,input().split()))
A=1
if 0 in L:
  print(0)
  exit()
for i in range(N):
  A=A*L[i]
  if 10**18<A:
    print(-1)
    exit()
print(A)

Buggy python submission (verdict: Runtime Error):
N=int(input())
L=list(map(int,input().split()))
A=1
for i in range(N):
  A=A*L[i]
  if 10**18<A:
  print(-1)
  exit()
print(A)

Fixed submission:
N=int(input())
L=list(map(int,input().split()))
A=1
if 0 in L:
  print(0)
  exit()
for i in range(N):
  A=A*L[i]
  if 10**18<A:
    print(-1)
    exit()
print(A)

Buggy python submission (verdict: Runtime Error):
N=int(input())
L=list(map(int,input().split()))
A=1
for i in range(N):
  A=A*L[i]
  if 10**18<A:
print(-1)
  exit()
print(A)

Fixed submission:
N=int(input())
L=list(map(int,input().split()))
A=1
if 0 in L:
  print(0)
  exit()
for i in range(N):
  A=A*L[i]
  if 10**18<A:
    print(-1)
    exit()
print(A)

Buggy python submission (verdict: Runtime Error):
N=int(input())
L=list(map(int,input().split()))
A=1
for i in range(N):
  A=A*L[i]
  if 10**18<A:
print(-1)
  exit()
  print(A)

Fixed submission:
N=int(input())
L=list(map(int,input().split()))
A=1
if 0 in L:
  print(0)
  exit()
for i in range(N):
  A=A*L[i]
  if 10**18<A:
    print(-1)
    exit()
print(A)

Buggy python submission (verdict: Runtime Error):
N=int(input())
L=list(map(int,input().split()))
A=1
for i in range(N):
  A=A*L[i]
  if 10**18<A:
  print(-1)
  exit()
  else:
  print(A)

Fixed submission:
N=int(input())
L=list(map(int,input().split()))
A=1
if 0 in L:
  print(0)
  exit()
for i in range(N):
  A=A*L[i]
  if 10**18<A:
    print(-1)
    exit()
print(A)

Buggy python submission (verdict: Runtime Error):
N=int(input())
L=list(map(int,input().split()))
A=1
for i in range(N):
  A=A*L[i]
  if 10**18<A:
print(-1)
  else:
print(A)
  exit()

Fixed submission:
N=int(input())
L=list(map(int,input().split()))
A=1
if 0 in L:
  print(0)
  exit()
for i in range(N):
  A=A*L[i]
  if 10**18<A:
    print(-1)
    exit()
print(A)

Buggy python submission (verdict: Runtime Error):
N=int(input())
L=list(map(int,input().split()))
A=1
for i in range(N):
  A=A*L[i]
  if 10**18<A:
print(-1)
  exit()
else:
  print(A)

Fixed submission:
N=int(input())
L=list(map(int,input().split()))
A=1
if 0 in L:
  print(0)
  exit()
for i in range(N):
  A=A*L[i]
  if 10**18<A:
    print(-1)
    exit()
print(A)

Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
L=list(map(int,input().split()))
A=1
for i in range(N):
  A=A*L[i]
if 10**18<A:
  print(-1)
  exit()
else:
  print(A)

Fixed submission:
N=int(input())
L=list(map(int,input().split()))
A=1
if 0 in L:
  print(0)
  exit()
for i in range(N):
  A=A*L[i]
  if 10**18<A:
    print(-1)
    exit()
print(A)

Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
L=list(map(int,input().split()))
A=1
for i in range(N):
  A=A*L[i]
if 10**18<A:
  print(-1)
else:
  print(A)

Fixed submission:
N=int(input())
L=list(map(int,input().split()))
A=1
if 0 in L:
  print(0)
  exit()
for i in range(N):
  A=A*L[i]
  if 10**18<A:
    print(-1)
    exit()
print(A)

Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
L=list(map(int,input().split()))
A=1
for i in range(N):
  A=A*L[i]
if 10**18>=A:
  print(A)
else:
  print(-1)

Fixed submission:
N=int(input())
L=list(map(int,input().split()))
A=1
if 0 in L:
  print(0)
  exit()
for i in range(N):
  A=A*L[i]
  if 10**18<A:
    print(-1)
    exit()
print(A)

Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
L=list(map(int,input().split()))
B=-1
A=1
for i in range(N):
  A=A*L[i]
if 10**18>=A:
  print(A)
else:
  print(B)

Fixed submission:
N=int(input())
L=list(map(int,input().split()))
A=1
if 0 in L:
  print(0)
  exit()
for i in range(N):
  A=A*L[i]
  if 10**18<A:
    print(-1)
    exit()
print(A)