Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
# ANSHUL GAUTAM
# IIIT-D

from math import *

'''

'''

a,b = list(map(int, input().split()))
print(0)


Fixed submission:
# ANSHUL GAUTAM
# IIIT-D

from math import *
from copy import *
from string import *				# alpha = ascii_lowercase
from random import *				# l.sort(key=lambda l1:l1[0]-l1[1]) => ex: sort on the basis difference
from sys import stdin
from sys import maxsize
from operator import *				# d = sorted(d.items(), key=itemgetter(1))
from itertools import *
from collections import Counter		# d = dict(Counter(l))
from collections import defaultdict # d = defaultdict(list)

'''

'''

def solve(l):
	n = len(l)
	

N = int(stdin.readline())
s,t = list(map(str, stdin.readline().rstrip().split()))
ans = ''
for i in range(N):
	ans += s[i] + t[i]
print(ans)

Buggy python submission (verdict: Runtime Error):
# ANSHUL GAUTAM
# IIIT-D

from math import *
from copy import *
from string import *				# alpha = ascii_lowercase
from random import *				# l.sort(key=lambda l1:l1[0]-l1[1]) => ex: sort on the basis difference
from sys import stdin
from sys import maxsize
from operator import *				# d = sorted(d.items(), key=itemgetter(1))
from itertools import *
from collections import Counter		# d = dict(Counter(l))
from collections import defaultdict # d = defaultdict(list)

'''

'''

def solve(a,b):
	g = gcd(a,b)
	return a*b//g

a,b = list(map(int, stdin.readline().rstrip().split()))
ans = solve(a,b)
print(ans)


Fixed submission:
# ANSHUL GAUTAM
# IIIT-D

from math import *
from copy import *
from string import *				# alpha = ascii_lowercase
from random import *				# l.sort(key=lambda l1:l1[0]-l1[1]) => ex: sort on the basis difference
from sys import stdin
from sys import maxsize
from operator import *				# d = sorted(d.items(), key=itemgetter(1))
from itertools import *
from collections import Counter		# d = dict(Counter(l))
from collections import defaultdict # d = defaultdict(list)

'''

'''

def solve(l):
	n = len(l)
	

N = int(stdin.readline())
s,t = list(map(str, stdin.readline().rstrip().split()))
ans = ''
for i in range(N):
	ans += s[i] + t[i]
print(ans)

Buggy python submission (verdict: Runtime Error):
# ANSHUL GAUTAM
# IIIT-D

from math import *

'''

'''

a,b = map(int, input().split())
print(0)


Fixed submission:
# ANSHUL GAUTAM
# IIIT-D

from math import *
from copy import *
from string import *				# alpha = ascii_lowercase
from random import *				# l.sort(key=lambda l1:l1[0]-l1[1]) => ex: sort on the basis difference
from sys import stdin
from sys import maxsize
from operator import *				# d = sorted(d.items(), key=itemgetter(1))
from itertools import *
from collections import Counter		# d = dict(Counter(l))
from collections import defaultdict # d = defaultdict(list)

'''

'''

def solve(l):
	n = len(l)
	

N = int(stdin.readline())
s,t = list(map(str, stdin.readline().rstrip().split()))
ans = ''
for i in range(N):
	ans += s[i] + t[i]
print(ans)
Buggy python submission (verdict: Runtime Error):
# ANSHUL GAUTAM
# IIIT-D

from math import *
from copy import *
from heapq import *
from string import *				# alpha = ascii_lowercase
from random import *				# l.sort(key=lambda l1:l1[0]-l1[1]) => ex: sort on the basis difference
from bisect import *				# bisect_left(arr,x,start,end)  => start and end parameters are temporary
from sys import stdin				# bisect_left return leftmost position where x should be inserted to keep sorted
from sys import maxsize
from operator import *				# d = sorted(d.items(), key=itemgetter(1))
from itertools import *
from collections import Counter		# d = dict(Counter(l))
from collections import defaultdict # d = defaultdict(list)

'''
3 4
4 3
4 1
2 2
'''

def solve(l,m):
	n = len(l)
	L = [[] for i in range(5)]
	for i in l:
		d,r = i
		L[d].append(r)
	ans = 0
	hp = []
	for i in range(1,m+1):
		for j in L[i]:
			heappush(hp,-j)
		if(hp):
			ans -= heappop(hp)
	return ans

N,M = list(map(int, stdin.readline().rstrip().split()))
l = []
for _ in range(N):
	a,b = list(map(int, stdin.readline().rstrip().split()))
	l.append([a,b])
ans = solve(l,M)
print(ans)



Fixed submission:
# ANSHUL GAUTAM
# IIIT-D

from math import *
from copy import *
from heapq import *
from string import *				# alpha = ascii_lowercase
from random import *				# l.sort(key=lambda l1:l1[0]-l1[1]) => ex: sort on the basis difference
from bisect import *				# bisect_left(arr,x,start,end)  => start and end parameters are temporary
from sys import stdin				# bisect_left return leftmost position where x should be inserted to keep sorted
from sys import maxsize
from operator import *				# d = sorted(d.items(), key=itemgetter(1))
from itertools import *
from collections import Counter		# d = dict(Counter(l))
from collections import defaultdict # d = defaultdict(list)

'''
3 4
4 3
4 1
2 2
'''

def solve(l,m):
	n = len(l)
	L = [[] for i in range(10**5+1)]
	for i in l:
		d,r = i
		L[d].append(r)
	ans = 0
	hp = []
	for i in range(1,m+1):
		for j in L[i]:
			heappush(hp,-j)
		if(hp):
			ans -= heappop(hp)
	return ans

N,M = list(map(int, stdin.readline().rstrip().split()))
l = []
for _ in range(N):
	a,b = list(map(int, stdin.readline().rstrip().split()))
	l.append([a,b])
ans = solve(l,M)
print(ans)
Buggy python submission (verdict: Runtime Error):
# ANSHUL GAUTAM
# IIIT-D

from math import *
from copy import *
from string import *
from random import *					# alpha = ascii_lowercase
from sys import stdin
from itertools import *
from collections import Counter			# z = dict(Counter(l))

def solve(l,n,k):
	if(n == 2):
		return abs(l[0] - l[1])
	else:
		dp = [999999999999]*n
		dp[1] = abs(l[0] - l[1])
		for i in range(1,n):
			j = K
			while(j > 0):
				if(i-j < n):
					dp[i] = min(dp[i-j] + abs(l[i] - l[i-j]), dp[i])
				j -= 1
		return dp[-1]


N,K = map(int, stdin.readline().rstrip().split())
l = list(map(int, stdin.readline().rstrip().split()))
ans = solve(l,N,K)
print(ans)

Fixed submission:
# ANSHUL GAUTAM
# IIIT-D

from math import *
from copy import *
from string import *
from random import *					# alpha = ascii_lowercase
from sys import stdin
from itertools import *
from collections import Counter			# z = dict(Counter(l))

def jump(l,i,end):
	dp = [0]*len(l)
	if(len(l) == 2):
		return abs(l[0] - l[1])
	dp[1] = abs(l[0] - l[1])
	for i in range(2,len(l)):
		dp[i] = min(abs(l[i] - l[i-2]) + dp[i-2], abs(l[i] - l[i-1]) + dp[i-1])
	return dp[-1]


N = int(stdin.readline())
l = list(map(int, stdin.readline().rstrip().split()))
ans = jump(l,N-1,N-1)
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
# ANSHUL GAUTAM
# IIIT-D

from math import *
from string import *
from itertools import *
from copy import *

N,M = map(int, input().split())
for i in range(M//N,0,-1):
	if(M%i == 0):
		print(i)
		break

Fixed submission:
def solve():
    n, m = map(int, input().split())
    for i in range(m//n,0,-1):
        if m % i == 0:
            break
    print(i)
 
solve()
Buggy python submission (verdict: Runtime Error):
# ANSHUL GAUTAM
# IIIT-D
 
def get_all_substrings(input_string):
  length = len(input_string)
  return list([input_string[i:j+1] for i in range(length) for j in range(i,length)])


s = input()
K = int(input())  
l = get_all_substrings(s)
l = sorted(l)
L = []
for i in l:
	if(i not in L):
		L.append(i)
print(L[K-1])








Fixed submission:
s = input()
K = int(input())
 
 
L = []
 
for i in range(1, K+1):
    for j in range(len(s)-i+1):
        L.append(s[j:j+i])
 
M = sorted(list(set(L)))
 
print(M[K-1])
Buggy python submission (verdict: Runtime Error):
# ANSHUL GAUTAM
# IIIT-D

A,B,C = map(int, input().split())
m = max(A,B,C)
s = sum(m-A,m-B,m-C)
if(s%2 == 0):
	print(s//2)
else:
	print(s//2 + 2)






Fixed submission:
# ANSHUL GAUTAM
# IIIT-D

A,B,C = map(int, input().split())
m = max(A,B,C)
s = sum((m-A,m-B,m-C))
if(s%2 == 0):
	print(s//2)
else:
	print(s//2 + 2)
Buggy python submission (verdict: Runtime Error):
K = int(input())
X = int(input())

if K*500 >= X:
  print("Yes")



Fixed submission:
K,X = map(int, input().split())

if K*500 >= X:
  print("Yes")
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
K = int(input())
X = int(input())

if K*500 >= X:
  print("Yes")
else:
  print("No")


Fixed submission:
K,X = map(int, input().split())

if K*500 >= X:
  print("Yes")
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
K = input()
X = input()

if K*500 >= X:
  print("Yes")
else:
  print("No")

Fixed submission:
K,X = map(int, input().split())

if K*500 >= X:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
N = input()

result = False
count = 0

for range(N):
    D1,D2 = map(int,input().split())
    if D1 == D2:
        count += 1
    else:
        count = 0

    if count > 2:
        result = True
        break

if result:
    print('Yes')
else:
    print('No')


Fixed submission:
N = int(input())

result = False
count = 0

for i in range(N):
    D1,D2 = map(int,input().split())
    if D1 == D2:
        count += 1
    else:
        count = 0

    if count > 2:
        result = True
        break

if result:
    print('Yes')
else:
    print('No')
Buggy python submission (verdict: Time Limit Exceeded):
MOD = 1000000007

N = int(input())
n_list = list(map(int,input().split()))

result = 0

for i in range(N):

    for j in range(N-i-1):
        result += n_list[i] * n_list[j+i+1] % MOD
        result = result % MOD

print(result)


Fixed submission:

N = int(input())
n_list = list(map(int,input().split()))

result = 0

s = sum(n_list)
m = 10**9+7

for num in n_list:
    s -= num
    result += num * s % m
    result %= m

print(result)

Buggy python submission (verdict: Runtime Error):
MOD = 1000000007

N = input()
n_list = list(map(int,input().split()))

print(n_list)

result = 0

for i in range(n):
    for j in range(n-i-1)
        result += n_list[i] * n_list[j+1] % MOD
        result = result % MOD

print(result)


Fixed submission:

N = int(input())
n_list = list(map(int,input().split()))

result = 0

s = sum(n_list)
m = 10**9+7

for num in n_list:
    s -= num
    result += num * s % m
    result %= m

print(result)
Buggy python submission (verdict: Time Limit Exceeded):
K = int(input())

num = 7

if(7 % K == 0):
    print(1)
    exit()

for i in range(1,K):
    num = num*10 + 7
    if(num % K == 0):
        print(i + 1)
        exit()

print(-1)
    


Fixed submission:
K = int(input())

num = 0

for i in range(0,K):
    num = num*10 + 7
    if num % K == 0:
        print(i + 1)
        exit()

    num %= K

print(-1)
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(map(int,input().split()))
Q = int(input())

cnt_dict = {}


s = sum(A)

ans = 0

for item in A:
    if item not in cnt_dict:
        cnt_dict[item] = 0
    cnt_dict[item] += 1

for _ in range(Q):
    X,Y = map(int,input().split())

    if X not in cnt_dict:
        cnt_dict[X] = 0
    if Y not in cnt_dict:
        cnt_dict[Y] = 0

    s -= cnt_dict[X] * X
    s += cnt_dict[X] * Y

    cnt_dict[Y] += cnt_dict[X]
    cnt_dict[X] = 0


    print(s)





'''
#初期案　遅すぎ

N = int(input())
A = list(map(int,input().split()))
Q = int(input())



for i in range(Q):
    X,Y = map(int,input().split())

    ans = 0

    for j in range(N):
        if A[j] == X:
            ans += Y
            A[j] = Y
        else:
            ans += A[j]

    print(ans)

    '''


Fixed submission:
a = str(input())


if 'A'<=a and a<='Z':
    print('A')
else:
    print('a')
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = list(map(int,input().split()))
Q = int(input())



for i in range(Q):
    X,Y = map(int,input().split())

    ans = 0

    for j in range(N):
        if A[j] == X:
            ans += Y
            A[j] = Y
        else:
            ans += A[j]

    print(ans)


Fixed submission:
N = int(input())
A = list(map(int,input().split()))
Q = int(input())

cnt_dict = {}


s = sum(A)

ans = 0

for item in A:
    if item not in cnt_dict:
        cnt_dict[item] = 0
    cnt_dict[item] += 1

for _ in range(Q):
    X,Y = map(int,input().split())

    if X not in cnt_dict:
        cnt_dict[X] = 0
    if Y not in cnt_dict:
        cnt_dict[Y] = 0

    s -= cnt_dict[X] * X
    s += cnt_dict[X] * Y

    cnt_dict[Y] += cnt_dict[X]
    cnt_dict[X] = 0


    print(s)





'''
#初期案　遅すぎ

N = int(input())
A = list(map(int,input().split()))
Q = int(input())



for i in range(Q):
    X,Y = map(int,input().split())

    ans = 0

    for j in range(N):
        if A[j] == X:
            ans += Y
            A[j] = Y
        else:
            ans += A[j]

    print(ans)

    '''
Buggy python submission (verdict: Runtime Error):
import sys,collections as cl,bisect as bs
sys.setrecursionlimit(100000)
input = sys.stdin.readline
mod = 10**9+7
Max = sys.maxsize
def l(): #intのlist
    return list(map(int,input().split()))
def m(): #複数文字
    return map(int,input().split())
def onem(): #Nとかの取得
    return int(input())
def s(x): #圧縮
    a = []
    if len(x) == 0:
        return []
    aa = x[0]
    su = 1
    for i in range(len(x)-1):
        if aa != x[i+1]:
            a.append([aa,su])
            aa = x[i+1]
            su = 1
        else:
            su += 1
    a.append([aa,su])
    return a
def jo(x): #listをスペースごとに分ける
    return " ".join(map(str,x))
def max2(x): #他のときもどうように作成可能
    return max(map(max,x))
def In(x,a): #aがリスト(sorted)
    k = bs.bisect_left(a,x)
    if k != len(a) and a[k] ==  x:
        return True
    else:
        return False

def pow_k(x, n):
    ans = 1
    while n:
        if n % 2:
            ans *= x
        x *= x
        n >>= 1
    return ans

"""
def nibu(x,n,r):
    ll = 0
    rr = r
    while True:
        mid = (ll+rr)//2

    if rr == mid:
        return ll
    if (ここに評価入れる):
        rr = mid
    else:
        ll = mid+1
"""


n = input().split()[:-1]

if n[-1] == "s":
    print(n + "es")
else:
    print(n + "s")

Fixed submission:
import sys,collections as cl,bisect as bs
sys.setrecursionlimit(100000)
input = sys.stdin.readline
mod = 10**9+7
Max = sys.maxsize
def l(): #intのlist
    return list(map(int,input().split()))
def m(): #複数文字
    return map(int,input().split())
def onem(): #Nとかの取得
    return int(input())
def s(x): #圧縮
    a = []
    if len(x) == 0:
        return []
    aa = x[0]
    su = 1
    for i in range(len(x)-1):
        if aa != x[i+1]:
            a.append([aa,su])
            aa = x[i+1]
            su = 1
        else:
            su += 1
    a.append([aa,su])
    return a
def jo(x): #listをスペースごとに分ける
    return " ".join(map(str,x))
def max2(x): #他のときもどうように作成可能
    return max(map(max,x))
def In(x,a): #aがリスト(sorted)
    k = bs.bisect_left(a,x)
    if k != len(a) and a[k] ==  x:
        return True
    else:
        return False

def pow_k(x, n):
    ans = 1
    while n:
        if n % 2:
            ans *= x
        x *= x
        n >>= 1
    return ans

"""
def nibu(x,n,r):
    ll = 0
    rr = r
    while True:
        mid = (ll+rr)//2

    if rr == mid:
        return ll
    if (ここに評価入れる):
        rr = mid
    else:
        ll = mid+1
"""


n = input()[:-1]

if n[-1] == "s":
    print(n + "es")
else:
    print(n + "s")
Buggy python submission (verdict: Runtime Error):
import sys,collections as cl,bisect as bs
sys.setrecursionlimit(100000)
input = sys.stdin.readline
mod = 10**9+7
Max = sys.maxsize
def l(): #intのlist
    return list(map(int,input().split()))
def m(): #複数文字
    return map(int,input().split())
def onem(): #Nとかの取得
    return int(input())
def s(x): #圧縮
    a = []
    if len(x) == 0:
        return []
    aa = x[0]
    su = 1
    for i in range(len(x)-1):
        if aa != x[i+1]:
            a.append([aa,su])
            aa = x[i+1]
            su = 1
        else:
            su += 1
    a.append([aa,su])
    return a
def jo(x): #listをスペースごとに分ける
    return " ".join(map(str,x))
def max2(x): #他のときもどうように作成可能
    return max(map(max,x))
def In(x,a): #aがリスト(sorted)
    k = bs.bisect_left(a,x)
    if k != len(a) and a[k] ==  x:
        return True
    else:
        return False

def pow_k(x, n):
    ans = 1
    while n:
        if n % 2:
            ans *= x
        x *= x
        n >>= 1
    return ans


def nibu(x,n,r):
    ll = 0
    rr = r
    while True:
        mid = (ll+rr)//2
        
        if rr == mid:
            return ll
        
        if cou(x,mid) <= n:
            rr = mid
        else:
            ll = mid+1

def cou(x,le):
    co = 0
    for i in range(len(x)):
        co += -(-x[i]//le) - 1
    return co


n,k = m()

a = l()

left = 0

right = 10**9


aaa = nibu(a,k,right)
print(aaa)


Fixed submission:
import sys,collections as cl,bisect as bs
sys.setrecursionlimit(100000)
input = sys.stdin.readline
mod = 10**9+7
Max = sys.maxsize
def l(): #intのlist
    return list(map(int,input().split()))
def m(): #複数文字
    return map(int,input().split())
def onem(): #Nとかの取得
    return int(input())
def s(x): #圧縮
    a = []
    if len(x) == 0:
        return []
    aa = x[0]
    su = 1
    for i in range(len(x)-1):
        if aa != x[i+1]:
            a.append([aa,su])
            aa = x[i+1]
            su = 1
        else:
            su += 1
    a.append([aa,su])
    return a
def jo(x): #listをスペースごとに分ける
    return " ".join(map(str,x))
def max2(x): #他のときもどうように作成可能
    return max(map(max,x))
def In(x,a): #aがリスト(sorted)
    k = bs.bisect_left(a,x)
    if k != len(a) and a[k] ==  x:
        return True
    else:
        return False

def pow_k(x, n):
    ans = 1
    while n:
        if n % 2:
            ans *= x
        x *= x
        n >>= 1
    return ans


def nibu(x,n,r):
    ll = 1
    rr = r
    while True:
        mid = (ll+rr)//2
        
        if rr == mid:
            return ll
        
        if cou(x,mid) <= n:
            rr = mid
        else:
            ll = mid+1

def cou(x,le):
    co = 0
    for i in range(len(x)):
        if le != 0:
            co += -(-x[i]//le) - 1
    return co


n,k = m()

a = l()

left = 0

right = 10**9


aaa = nibu(a,k,right)
print(aaa)
Buggy python submission (verdict: Time Limit Exceeded):
import sys,collections as cl,bisect as bs
sys.setrecursionlimit(100000)
input = sys.stdin.readline
mod = 10**9+7
Max = sys.maxsize
def l(): #intのlist
	return list(map(int,input().split()))
def m(): #複数文字
	return map(int,input().split())
def onem(): #Nとかの取得
	return int(input())
def s(x): #圧縮
	a = []
	if len(x) == 0:
		return []
	aa = x[0]
	su = 1
	for i in range(len(x)-1):
		if aa != x[i+1]:
			a.append([aa,su])
			aa = x[i+1]
			su = 1
		else:
			su += 1
	a.append([aa,su])
	return a
def jo(x): #listをスペースごとに分ける
	return " ".join(map(str,x))
def max2(x): #他のときもどうように作成可能
	return max(map(max,x))
def In(x,a): #aがリスト(sorted)
    k = bs.bisect_left(a,x)
    if k != len(a) and a[k] ==  x:
        return True
    else:
        return False

def pow_k(x, n):
    ans = 1
    while n:
        if n % 2:
            ans *= x
        x *= x
        n >>= 1
    return ans

"""
def nibu(x,n,r):
	ll = 0
	rr = r
	while True:
		mid = (ll+rr)//2

	if rr == mid:
		return ll
	if (ここに評価入れる):
		rr = mid
	else:
		ll = mid+1
"""

n = onem()

a = l()

a.sort()

aa = s(a)

ans = 0

for i in range(len(aa)):
	co = 0
	f = 0
	for j in range(i):
		if aa[i][0] >= aa[j][0] * 2:
			if aa[i][0] // aa[j][0] == aa[i][0] / aa[j][0]:
				f = 1
		else:
			break
	if aa[i][1] != 1:
		f = 1
	if not f:
		ans += 1



print(ans)


Fixed submission:
import sys,collections as cl,bisect as bs
sys.setrecursionlimit(100000)
input = sys.stdin.readline
mod = 10**9+7
Max = sys.maxsize
def l(): #intのlist
	return list(map(int,input().split()))
def m(): #複数文字
	return map(int,input().split())
def onem(): #Nとかの取得
	return int(input())
def s(x): #圧縮
	a = []
	if len(x) == 0:
		return []
	aa = x[0]
	su = 1
	for i in range(len(x)-1):
		if aa != x[i+1]:
			a.append([aa,su])
			aa = x[i+1]
			su = 1
		else:
			su += 1
	a.append([aa,su])
	return a
def jo(x): #listをスペースごとに分ける
	return " ".join(map(str,x))
def max2(x): #他のときもどうように作成可能
	return max(map(max,x))
def In(x,a): #aがリスト(sorted)
    k = bs.bisect_left(a,x)
    if k != len(a) and a[k] ==  x:
        return True
    else:
        return False

def pow_k(x, n):
    ans = 1
    while n:
        if n % 2:
            ans *= x
        x *= x
        n >>= 1
    return ans

"""
def nibu(x,n,r):
	ll = 0
	rr = r
	while True:
		mid = (ll+rr)//2

	if rr == mid:
		return ll
	if (ここに評価入れる):
		rr = mid
	else:
		ll = mid+1
"""

n = onem()

a = l()

a.sort()

aa = s(a)

ans = 0
dp = [0 for i in range(10**6+1)]
for i in range(len(aa)):
	f = 0
	if aa[i][1] != 1:
		f = 1
	elif dp[aa[i][0]] != 0:
		f = 1
	for _ in range(aa[i][0],10**6+1,aa[i][0]):
		dp[_] = 1
	if not f:
		ans += 1



print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
import sys,collections as cl,bisect as bs
sys.setrecursionlimit(100000)
input = sys.stdin.readline
mod = 10**9+7
Max = sys.maxsize
def l(): #intのlist
	return list(map(int,input().split()))
def m(): #複数文字
	return map(int,input().split())
def onem(): #Nとかの取得
	return int(input())
def s(x): #圧縮
	a = []
	if len(x) == 0:
		return []
	aa = x[0]
	su = 1
	for i in range(len(x)-1):
		if aa != x[i+1]:
			a.append([aa,su])
			aa = x[i+1]
			su = 1
		else:
			su += 1
	a.append([aa,su])
	return a
def jo(x): #listをスペースごとに分ける
	return " ".join(map(str,x))
def max2(x): #他のときもどうように作成可能
	return max(map(max,x))
def In(x,a): #aがリスト(sorted)
    k = bs.bisect_left(a,x)
    if k != len(a) and a[k] ==  x:
        return True
    else:
        return False

def pow_k(x, n):
    ans = 1
    while n:
        if n % 2:
            ans *= x
        x *= x
        n >>= 1
    return ans

"""
def nibu(x,n,r):
	ll = 0
	rr = r
	while True:
		mid = (ll+rr)//2

	if rr == mid:
		return ll
	if (ここに評価入れる):
		rr = mid
	else:
		ll = mid+1
"""

n = onem()

a = l()

ans = a[0]

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

print(ans)



Fixed submission:
import sys,collections as cl,bisect as bs
sys.setrecursionlimit(100000)
input = sys.stdin.readline
mod = 10**9+7
Max = sys.maxsize
def l(): #intのlist
	return list(map(int,input().split()))
def m(): #複数文字
	return map(int,input().split())
def onem(): #Nとかの取得
	return int(input())
def s(x): #圧縮
	a = []
	if len(x) == 0:
		return []
	aa = x[0]
	su = 1
	for i in range(len(x)-1):
		if aa != x[i+1]:
			a.append([aa,su])
			aa = x[i+1]
			su = 1
		else:
			su += 1
	a.append([aa,su])
	return a
def jo(x): #listをスペースごとに分ける
	return " ".join(map(str,x))
def max2(x): #他のときもどうように作成可能
	return max(map(max,x))
def In(x,a): #aがリスト(sorted)
    k = bs.bisect_left(a,x)
    if k != len(a) and a[k] ==  x:
        return True
    else:
        return False

def pow_k(x, n):
    ans = 1
    while n:
        if n % 2:
            ans *= x
        x *= x
        n >>= 1
    return ans

"""
def nibu(x,n,r):
	ll = 0
	rr = r
	while True:
		mid = (ll+rr)//2

	if rr == mid:
		return ll
	if (ここに評価入れる):
		rr = mid
	else:
		ll = mid+1
"""

n = onem()

a = l()

ans = a[0]

for i in range(1,n):
	if ans == -1:
		if a[i] == 0:
			ans *= 0
			break
	if ans != -1:
		ans *= a[i]
	if ans > 10**18:
		ans = -1

print(ans)