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

Fixed submission:
n=int(input())
x=list(map(int,input().split()))
ans=1
for i in x:
  if i==0:
    print(0)
    exit()

for i in x:
    ans=ans*i
    if ans>10**18:
      ans=-1
      break
print(ans)

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

Fixed submission:
n=int(input())
x=list(map(int,input().split()))
ans=1
for i in x:
  if i==0:
    print(0)
    exit()

for i in x:
    ans=ans*i
    if ans>10**18:
      ans=-1
      break
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
x=list(map(int,input().split()))
ans=1
if x.count(0)>1:
   print(0)
for i in x:
  ans=ans*i
  if ans>10**18:
    ans=-1
print(ans)

Fixed submission:
n=int(input())
x=list(map(int,input().split()))
ans=1
for i in x:
  if i==0:
    print(0)
    exit()

for i in x:
    ans=ans*i
    if ans>10**18:
      ans=-1
      break
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
x=list(map(int,input().split()))
ans=1
if x.count(0)>=18:
  print(-1)
  exit()
  
for i in x:
  ans=ans*i
  if ans>10**18:
    ans=-1
print(ans)

Fixed submission:
n=int(input())
x=list(map(int,input().split()))
ans=1
for i in x:
  if i==0:
    print(0)
    exit()

for i in x:
    ans=ans*i
    if ans>10**18:
      ans=-1
      break
print(ans)

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

Fixed submission:
n=int(input())
x=list(map(int,input().split()))
ans=1
for i in x:
  if i==0:
    print(0)
    exit()

for i in x:
    ans=ans*i
    if ans>10**18:
      ans=-1
      break
print(ans)

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

digits=0
ans=1

for i in list:
  digits+=len(i)
  if digits >=18:
   print(-1)
  else:
    ans=ans*i

print(ans)

Fixed submission:
n=int(input())
x=list(map(int,input().split()))
ans=1
for i in x:
  if i==0:
    print(0)
    exit()

for i in x:
    ans=ans*i
    if ans>10**18:
      ans=-1
      break
print(ans)

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


Fixed submission:
n=int(input())
x=list(map(int,input().split()))
ans=1
for i in x:
  if i==0:
    print(0)
    exit()

for i in x:
    ans=ans*i
    if ans>10**18:
      ans=-1
      break
print(ans)

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

Fixed submission:
n=int(input())
x=list(map(int,input().split()))
ans=1
for i in x:
  if i==0:
    print(0)
    exit()

for i in x:
    ans=ans*i
    if ans>10**18:
      ans=-1
      break
print(ans)