Buggy python submission (verdict: Time Limit Exceeded):
from functools import reduce
import sys
input = sys.stdin.readline

count = int(input())
list = list(map(int, input().split()))
if 0 in list:
    print(0)
else:
    sum = reduce(lambda x, y: x*y, list)
    if sum > 1000000000000000000:
        sum = -1
    print(sum)

Fixed submission:
from functools import reduce
from operator import mul
import sys
input = sys.stdin.readline

count = int(input())
list = list(map(int, input().split()))
sum = list[0]
if 0 in list:
    print(0)
    exit()
else:
    for i in range(count - 1):
        sum = sum * list[i + 1]
        if sum > 1000000000000000000:
            print(-1)
            exit()


    print(sum)

Buggy python submission (verdict: Time Limit Exceeded):
from functools import reduce
import sys
input = sys.stdin.readline

count = int(input())
list = list(map(int, input().split()))
sum = reduce(lambda x, y: x*y, list)


if sum > 1000000000000000000:
    sum = -1

print(sum)

Fixed submission:
from functools import reduce
from operator import mul
import sys
input = sys.stdin.readline

count = int(input())
list = list(map(int, input().split()))
sum = list[0]
if 0 in list:
    print(0)
    exit()
else:
    for i in range(count - 1):
        sum = sum * list[i + 1]
        if sum > 1000000000000000000:
            print(-1)
            exit()


    print(sum)

Buggy python submission (verdict: Time Limit Exceeded):
from functools import reduce
import sys
input = sys.stdin.readline

count = int(input())
list = list(map(int, input().split()))
sum = reduce(lambda x, y: x*y, list)


if sum > 1000000000000000000:
    sum = -1

print(sum)

Fixed submission:
from functools import reduce
from operator import mul
import sys
input = sys.stdin.readline

count = int(input())
list = list(map(int, input().split()))
sum = list[0]
if 0 in list:
    print(0)
    exit()
else:
    for i in range(count - 1):
        sum = sum * list[i + 1]
        if sum > 1000000000000000000:
            print(-1)
            exit()


    print(sum)

Buggy python submission (verdict: Time Limit Exceeded):
from functools import reduce
from operator import mul
import sys
input = sys.stdin.readline

count = int(input())
list = list(map(int, input().split()))
sum = reduce(mul, list)

if sum > 1000000000000000000:
    sum = -1

print(sum)

Fixed submission:
from functools import reduce
from operator import mul
import sys
input = sys.stdin.readline

count = int(input())
list = list(map(int, input().split()))
sum = list[0]
if 0 in list:
    print(0)
    exit()
else:
    for i in range(count - 1):
        sum = sum * list[i + 1]
        if sum > 1000000000000000000:
            print(-1)
            exit()


    print(sum)

Buggy python submission (verdict: Time Limit Exceeded):
from functools import reduce
from operator import mul
import sys
input = sys.stdin.readline

count = int(input())
list = list(map(int, input().split()))
sum = reduce(mul, list)

if sum > 1000000000000000000:
    sum = -1

print(sum)

Fixed submission:
from functools import reduce
from operator import mul
import sys
input = sys.stdin.readline

count = int(input())
list = list(map(int, input().split()))
sum = list[0]
if 0 in list:
    print(0)
    exit()
else:
    for i in range(count - 1):
        sum = sum * list[i + 1]
        if sum > 1000000000000000000:
            print(-1)
            exit()


    print(sum)

Buggy python submission (verdict: Time Limit Exceeded):
import sys
input = sys.stdin.readline

count = int(input())
list = list(map(int, input().split()))
sum = list[0]
for i in range(count - 1):
    sum = sum * list[i + 1]

if sum > 1000000000000000000:
    sum = -1

print(sum)

Fixed submission:
from functools import reduce
from operator import mul
import sys
input = sys.stdin.readline

count = int(input())
list = list(map(int, input().split()))
sum = list[0]
if 0 in list:
    print(0)
    exit()
else:
    for i in range(count - 1):
        sum = sum * list[i + 1]
        if sum > 1000000000000000000:
            print(-1)
            exit()


    print(sum)

Buggy python submission (verdict: Time Limit Exceeded):
import sys
input = sys.stdin.readline

count = int(input())
list = list(map(int, input().split()))
sum = list[0]
for i in range(count - 1):
    sum = sum * list[i + 1]

if sum > 1000000000000000000:
    sum = -1

print(sum)

Fixed submission:
from functools import reduce
from operator import mul
import sys
input = sys.stdin.readline

count = int(input())
list = list(map(int, input().split()))
sum = list[0]
if 0 in list:
    print(0)
    exit()
else:
    for i in range(count - 1):
        sum = sum * list[i + 1]
        if sum > 1000000000000000000:
            print(-1)
            exit()


    print(sum)

Buggy python submission (verdict: Time Limit Exceeded):
count = int(input())
list = list(map(int, input().split()))
sum = list[0]
for i in range(count - 1):
    sum = sum * list[i + 1]

if sum > 1000000000000000000:
    sum = -1

print(sum)

Fixed submission:
from functools import reduce
from operator import mul
import sys
input = sys.stdin.readline

count = int(input())
list = list(map(int, input().split()))
sum = list[0]
if 0 in list:
    print(0)
    exit()
else:
    for i in range(count - 1):
        sum = sum * list[i + 1]
        if sum > 1000000000000000000:
            print(-1)
            exit()


    print(sum)

Buggy python submission (verdict: Time Limit Exceeded):
import operator
from functools import reduce
import sys
input = sys.stdin.readline

count = int(input())
list = list(map(int, input().split()))
sum = reduce(operator.mul, list, 1)

if sum > 1000000000000000000:
    sum = -1

print(sum)

Fixed submission:
from functools import reduce
from operator import mul
import sys
input = sys.stdin.readline

count = int(input())
list = list(map(int, input().split()))
sum = list[0]
if 0 in list:
    print(0)
    exit()
else:
    for i in range(count - 1):
        sum = sum * list[i + 1]
        if sum > 1000000000000000000:
            print(-1)
            exit()


    print(sum)

Buggy python submission (verdict: Time Limit Exceeded):
import operator
from functools import reduce

count = int(input())
list = list(map(int, input().split()))
sum = reduce(operator.mul, list, 1)

if sum > 1000000000000000000:
    sum = -1

print(sum)

Fixed submission:
from functools import reduce
from operator import mul
import sys
input = sys.stdin.readline

count = int(input())
list = list(map(int, input().split()))
sum = list[0]
if 0 in list:
    print(0)
    exit()
else:
    for i in range(count - 1):
        sum = sum * list[i + 1]
        if sum > 1000000000000000000:
            print(-1)
            exit()


    print(sum)

Buggy python submission (verdict: Time Limit Exceeded):
import operator
from functools import reduce

count = int(input())
list = list(map(int, input().split()))
sum = reduce(operator.mul, list, 1)

if sum > 1000000000000000000:
    sum = -1

print(sum)

Fixed submission:
from functools import reduce
from operator import mul
import sys
input = sys.stdin.readline

count = int(input())
list = list(map(int, input().split()))
sum = list[0]
if 0 in list:
    print(0)
    exit()
else:
    for i in range(count - 1):
        sum = sum * list[i + 1]
        if sum > 1000000000000000000:
            print(-1)
            exit()


    print(sum)

Buggy python submission (verdict: Time Limit Exceeded):
import functools
import operator

prod = functools.partial(functools.reduce, operator.mul)
count = int(input())
list = list(map(int, input().split()))
sum = prod(list)

if sum > 1000000000000000000:
    sum = -1

print(sum)

Fixed submission:
from functools import reduce
from operator import mul
import sys
input = sys.stdin.readline

count = int(input())
list = list(map(int, input().split()))
sum = list[0]
if 0 in list:
    print(0)
    exit()
else:
    for i in range(count - 1):
        sum = sum * list[i + 1]
        if sum > 1000000000000000000:
            print(-1)
            exit()


    print(sum)