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

flag = 0
if data.count(0) > 0:
  print(0)
else
	a = data[0]
	for i in range(1,n):
  		a = a*data[i]
        if a > 10**18:
          flag = 1
          break

	if flag == 1:
  		print('-1')
	else
		print(a)

Fixed submission:
n = int(input())
data = list(map(int, input().split()))

flag = 0
if data.count(0) > 0:
	print(0)
else:
  a = data[0]
  for i in range(1,n):
    a = a*data[i]
    if a > 10**18:
      flag = 1
      break
      
  if flag == 1:
    print('-1')
  else:
    print(a)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
data = list(map(int, input().split()))
 
a = 1
i = 0
while i<n:
  if data[i]==0:
    a = 0
    break
  a = a*data[i]
  i += 1

if a > 10**18:
  a = -1
 
print(a)

Fixed submission:
n = int(input())
data = list(map(int, input().split()))

flag = 0
if data.count(0) > 0:
	print(0)
else:
  a = data[0]
  for i in range(1,n):
    a = a*data[i]
    if a > 10**18:
      flag = 1
      break
      
  if flag == 1:
    print('-1')
  else:
    print(a)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
data = list(map(int, input().split()))
 
a = 1
i = 0
j = 0
    
while i<n:
  while j < n:
    if data[j]==0:
    	  a = 0
    	  break
    j +=1
  # break
  a = a*data[i]
  i += 1
 
if a > 10**18:
  a = -1
 
print(a)

Fixed submission:
n = int(input())
data = list(map(int, input().split()))

flag = 0
if data.count(0) > 0:
	print(0)
else:
  a = data[0]
  for i in range(1,n):
    a = a*data[i]
    if a > 10**18:
      flag = 1
      break
      
  if flag == 1:
    print('-1')
  else:
    print(a)

Buggy python submission (verdict: Runtime Error):
n = int(input())
data = list(map(int, input().split()))
 
a = 1
i = 0
    
while i<n:
  while j < n:
  	if data[j]==0:
    	a = 0
    	break
    j +=1  
  a = a*data[i]
  i += 1

if a > 10**18:
  a = -1
 
print(a)

Fixed submission:
n = int(input())
data = list(map(int, input().split()))

flag = 0
if data.count(0) > 0:
	print(0)
else:
  a = data[0]
  for i in range(1,n):
    a = a*data[i]
    if a > 10**18:
      flag = 1
      break
      
  if flag == 1:
    print('-1')
  else:
    print(a)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
data = list(map(int, input().split()))
 
a = 1
i = 0
while i<n:
  if data[i]==0:
    a = 0
    break
  a = a*data[i]
  i += 1

if a > 10**18:
  a = -1
 
print(a)

Fixed submission:
n = int(input())
data = list(map(int, input().split()))

flag = 0
if data.count(0) > 0:
	print(0)
else:
  a = data[0]
  for i in range(1,n):
    a = a*data[i]
    if a > 10**18:
      flag = 1
      break
      
  if flag == 1:
    print('-1')
  else:
    print(a)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
data = list(map(int, input().split()))
 
a = 1
i = 0
for i in range(n):
  a = a*data[i]

if a > 10**18:
  a = -1
    # break
 
print(a)

Fixed submission:
n = int(input())
data = list(map(int, input().split()))

flag = 0
if data.count(0) > 0:
	print(0)
else:
  a = data[0]
  for i in range(1,n):
    a = a*data[i]
    if a > 10**18:
      flag = 1
      break
      
  if flag == 1:
    print('-1')
  else:
    print(a)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
data = list(map(int, input().split()))
 
a = 1
i = 0
while i<n:
  a = a*data[i]
  i += 1

if a > 10**18:
  a = -1
    # break
 
print(a)

Fixed submission:
n = int(input())
data = list(map(int, input().split()))

flag = 0
if data.count(0) > 0:
	print(0)
else:
  a = data[0]
  for i in range(1,n):
    a = a*data[i]
    if a > 10**18:
      flag = 1
      break
      
  if flag == 1:
    print('-1')
  else:
    print(a)

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

a = 1
while i<n:
  a = a*data[i]
  i += 1
  if a > 10^18:
    a = -1

print(a)

Fixed submission:
n = int(input())
data = list(map(int, input().split()))

flag = 0
if data.count(0) > 0:
	print(0)
else:
  a = data[0]
  for i in range(1,n):
    a = a*data[i]
    if a > 10**18:
      flag = 1
      break
      
  if flag == 1:
    print('-1')
  else:
    print(a)