main = do
    n <- readLn :: IO Integer
    a <- readLn :: IO Integer
    b <- readLn :: IO Integer
    c <- readLn :: IO Integer
    d <- readLn :: IO Integer
    e <- readLn :: IO Integer
    print $ 5 + div (minimum $ [a,b,c,d,e]) n
