main = do
    n <- getLine
    an <- map read <$> (words <$> getLine) :: IO [Integer]
    let resulte = product an
    if resulte > (10^18)
        then putStrLn $ "-1"
        else putStrLn $ show $ resulte