[<AutoOpen>]
module Program

open System

let read f = stdin.ReadLine() |> f
let reads f = stdin.ReadLine().Split() |> Array.toList |> List.map f

let div x y = (x + y - 1L) / y

[<EntryPoint>]
let main _ =
    let n = read int64
    let xs = List.init 5 (fun _ -> read int64)
    div n (List.min xs) + 4L
    |> printfn "%i"
    0