-- Your code here!
--calc m
    

main = do
    n <- getLine
    m <- map read .words <$> getLine :: IO [Int]
    
    let ans = product m
    
    if ans <= 10^18 then
        print ans
    else 
        putStrLn "-1"