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

if 0 in s:
    print(0)
else:    
    for i in range(n+1):
        ans *= s[i]
        if ans > 10 ** 18:
            ans = -1
            break
    print(ans)


Fixed submission:
n = int(input())
s = list(map(int,input().split()))
ans = 1

if 0 in s:
    print(0)
else:    
    for i in range(n):
        ans *= s[i]
        if ans > 10 ** 18:
            ans = -1
            break
    print(ans)

Buggy python submission (verdict: Runtime Error):
n = int(input())
s = map(int,input().split())
ans = 1

if 0 in s:
    print(0)
else:    
    for i in range(n):
        ans *= s[i]
        if ans > 10 ** 18:
            ans = -1
            break
    print(ans)

Fixed submission:
n = int(input())
s = list(map(int,input().split()))
ans = 1

if 0 in s:
    print(0)
else:    
    for i in range(n):
        ans *= s[i]
        if ans > 10 ** 18:
            ans = -1
            break
    print(ans)

Buggy python submission (verdict: Runtime Error):
n = input()
s = []
ans = 1

for _ in range(n):
    s.append(map(int,input()))

if 0 in s:
    print(0)
else:    
    for i in range(n):
        ans *= s[i]
        if ans > 10 ** 18:
            ans = -1
            break
    print(ans)


Fixed submission:
n = int(input())
s = list(map(int,input().split()))
ans = 1

if 0 in s:
    print(0)
else:    
    for i in range(n):
        ans *= s[i]
        if ans > 10 ** 18:
            ans = -1
            break
    print(ans)

Buggy python submission (verdict: Runtime Error):
n = input()
s = []
ans = 1

for _ in range(n):
    s.append(map(int,input()))

if 0 in s:
    print(0)
else:    
    for i in range(n+1):
        ans *= s[i]

if ans > 10**18:
    print(-1)
else:
    print(ans)

Fixed submission:
n = int(input())
s = list(map(int,input().split()))
ans = 1

if 0 in s:
    print(0)
else:    
    for i in range(n):
        ans *= s[i]
        if ans > 10 ** 18:
            ans = -1
            break
    print(ans)

Buggy python submission (verdict: Runtime Error):
n = input()
s = []
ans = 1

for _ in range(n):
    s.append(map(int,input()))

if "o" in s:
    print(0)
else:
    for i in range(n+1):
       ans *= s[i]
       if ans > 10**18:
           ans = -1
           break
    print(ans)

Fixed submission:
n = int(input())
s = list(map(int,input().split()))
ans = 1

if 0 in s:
    print(0)
else:    
    for i in range(n):
        ans *= s[i]
        if ans > 10 ** 18:
            ans = -1
            break
    print(ans)

Buggy python submission (verdict: Runtime Error):
n = int(input())
a = [int(n) for n in input().split()]
ans = 1

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

Fixed submission:
n = int(input())
s = list(map(int,input().split()))
ans = 1

if 0 in s:
    print(0)
else:    
    for i in range(n):
        ans *= s[i]
        if ans > 10 ** 18:
            ans = -1
            break
    print(ans)

Buggy python submission (verdict: Runtime Error):
for i in range(n):
    ans *= a[i]
        if ans > 10**18:
            print(-1)
            exit:
        
    exit:
print(ans)

Fixed submission:
n = int(input())
s = list(map(int,input().split()))
ans = 1

if 0 in s:
    print(0)
else:    
    for i in range(n):
        ans *= s[i]
        if ans > 10 ** 18:
            ans = -1
            break
    print(ans)