import Control.Monad

main = do
    [n, a, b, c, d, e] <- forM [1 .. 6] $ \i -> read <$> getLine
    putStrLn $ show $ solve n [a, b, c, d, e]

solve :: Integer -> [Integer] -> Integer
solve n a = (n + m - 1) `div` m + 4
  where
    m = minimum a