

n = int(eval(input()))

An = [int(x) for x in input().split()]

An.sort(reverse=True)



if 0 in An:

    print((0))

    exit()



j = 10 ** 18

ans = 1

for i in range(n):

    if ans > j:

        print((-1))

        quit()

    ans *= An[i]



if ans > j :

    print((-1))

    

else :

    print(ans)





n = int(eval(input()))

An = [int(x) for x in input().split()]



for i in range(n):

    if An[i] == 0:

        print((0))

        quit()



j = 10 ** 18

ans = 1

for i in range(n):

    if ans > j:

        print((-1))

        quit()

    ans *= An[i]



if ans > j :

    print((-1))

    

else :

    print(ans)



n = int(eval(input()))
An = [int(x) for x in input().split()]
An.sort(reverse=True)
if 0 in An:
    print((0))
    exit()
j = 10**18
ans = 1
for i in range(n):
    if ans > j:
        print((-1))
        quit()
    ans *= An[i]
if ans > j:
    print((-1))
else:
    print(ans)

n = int(eval(input()))
An = [int(x) for x in input().split()]
for i in range(n):
    if An[i] == 0:
        print((0))
        quit()
j = 10**18
ans = 1
for i in range(n):
    if ans > j:
        print((-1))
        quit()
    ans *= An[i]
if ans > j:
    print((-1))
else:
    print(ans)

-An.sort(reverse=True) -if 0 in An: -    print((0)) -    exit() +for i in range(n): +    if An[i] == 0: +        print((0)) +        quit()