module Main where

  import           Control.Monad
  import           Data.List
  import           Data.Int
  import           Data.Ord
  import           Data.List.Split
  import           Data.Array.IO
  import qualified Data.Vector.Unboxed as V

  main :: IO ()
  main = do
    n <- readLn :: IO Int64
    as <- replicateM 5 readLn :: IO [Int64]
    let m = minimum as :: Int64
        a = 5 + (n `div` m) :: Int64
    print a
