main :: IO()
main = do
    n <- readLn
    a <- readLn
    b <- readLn
    c <- readLn
    d <- readLn
    e <- readLn
    print $ (ceil n (min' [a,b,c,d,e])) + 4


min' :: [Int] -> Int
min' ls
    | length ls == 1					= head ls
    | head ls < last ls 				= min' $ init ls
    | otherwise							= min' $ tail ls

ceil :: Int -> Int -> Int
ceil num1 num2 = if (mod num1 num2) == 0 then div num1 num2 else (div num1 num2) + 1