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

Fixed submission:
n = int(input())
s = sorted(map(int,input().split()))
M = 10 ** 18
ans = 1
for ss in s:
	ans *= ss
	if ans > M:
		ans = -1
		break
	elif ans == 0:
		break
print(ans)

Buggy python submission (verdict: Runtime Error):
n = int(input())
s = sorted(map,int,input().split())
M = 10 ** 18
ans = 1
for ss in s:
	ans *= ss
	if ans > M:
		ans = -1
		break
	elif ans == 0:
		break

Fixed submission:
n = int(input())
s = sorted(map(int,input().split()))
M = 10 ** 18
ans = 1
for ss in s:
	ans *= ss
	if ans > M:
		ans = -1
		break
	elif ans == 0:
		break
print(ans)

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

Fixed submission:
n = int(input())
s = sorted(map(int,input().split()))
M = 10 ** 18
ans = 1
for ss in s:
	ans *= ss
	if ans > M:
		ans = -1
		break
	elif ans == 0:
		break
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
from operator import mul
from functools import reduce
n = int(input())
a = list(map(int,input().split()))
 
if 0 in a:
	print(0)
else:
	M = 10**18
	ans = reduce(mul, a)
	if ans > M:
		print(-1)
	else:
		print(ans)

Fixed submission:
n = int(input())
s = sorted(map(int,input().split()))
M = 10 ** 18
ans = 1
for ss in s:
	ans *= ss
	if ans > M:
		ans = -1
		break
	elif ans == 0:
		break
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
from operator import mul
from functools import reduce
n = int(input())
a = list(map(int,input().split()))
tmp = sorted(a)
M = 10**18
s = 0
ans = a[0]
for i in range(1,n):
	if 0 in a:
		print(0)
		break
	else:
		ans *= a[i]
		if ans > M:
			print(-1)
			s = 0
			break
		else:
			s = ans
if s != 0:
	print(s)
   

Fixed submission:
n = int(input())
s = sorted(map(int,input().split()))
M = 10 ** 18
ans = 1
for ss in s:
	ans *= ss
	if ans > M:
		ans = -1
		break
	elif ans == 0:
		break
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
from operator import mul
from functools import reduce
n = int(input())
a = list(map(int,input().split()))
tmp = sorted(a)
M = 10**18

if 0 in a:
	print(0)
else:
	tmp = reduce(mul, a)
	if tmp > M:
		print(-1)
	else:
		print(tmp)
   

Fixed submission:
n = int(input())
s = sorted(map(int,input().split()))
M = 10 ** 18
ans = 1
for ss in s:
	ans *= ss
	if ans > M:
		ans = -1
		break
	elif ans == 0:
		break
print(ans)

Buggy python submission (verdict: Runtime Error):
from operator import mul
from functools import reduce
n = int(input())
a = list(map(int,input().split()))
M = 10**18
if 0 in a:
	print(0)
	break
else:
	ans = reduce(mul, a)
	if ans > M:
		print(-1)
		break
	else:
		print(ans)


Fixed submission:
n = int(input())
s = sorted(map(int,input().split()))
M = 10 ** 18
ans = 1
for ss in s:
	ans *= ss
	if ans > M:
		ans = -1
		break
	elif ans == 0:
		break
print(ans)

Buggy python submission (verdict: Runtime Error):
from operator import mul
from functools import reduce
n = int(input())
a = list(map(int,input().split()))

if 0 in a:
	print(0)
else:
	M = 10**18
	ans = reduce(mul, a)
	if ans > M:
		print(-1)
		break
	else:
		print(ans)


Fixed submission:
n = int(input())
s = sorted(map(int,input().split()))
M = 10 ** 18
ans = 1
for ss in s:
	ans *= ss
	if ans > M:
		ans = -1
		break
	elif ans == 0:
		break
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
from operator import mul
from functools import reduce
n = int(input())
a = list(map(int,input().split()))

if 0 in a:
	print(0)
else:
	M = 10**18
	ans = reduce(mul, a)
	if ans > M:
		print(-1)
	else:
		print(ans)


Fixed submission:
n = int(input())
s = sorted(map(int,input().split()))
M = 10 ** 18
ans = 1
for ss in s:
	ans *= ss
	if ans > M:
		ans = -1
		break
	elif ans == 0:
		break
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
from operator import mul
from functools import reduce
n = int(input())
a = list(map(int,input().split()))
M = 10**18
ans = reduce(mul, a)
if ans > M:
	print(-1)
else:
	print(ans)


Fixed submission:
n = int(input())
s = sorted(map(int,input().split()))
M = 10 ** 18
ans = 1
for ss in s:
	ans *= ss
	if ans > M:
		ans = -1
		break
	elif ans == 0:
		break
print(ans)