import           Data.Bool                      ( bool )
import qualified Data.ByteString.Char8         as BS
import qualified Data.Vector                   as V

main =
  getLine
    >>  V.product
    .   V.map (read . BS.unpack)
    .   V.fromList  -- Vector ByteString
    .   BS.words    -- [ByteString]
    <$> BS.getLine  -- IO ByteString
    >>= \x -> print $ bool (-1) x $ (x <= 10 ^ 18)
