let readString() = stdin.ReadLine()
let readStringArray() = stdin.ReadLine().Split(' ');
let readInt() = readString() |> int
let readUint() = readString() |> uint64
let readIntArray() = readStringArray() |> Array.map(fun x -> int x)
let char2String(value) = List.ofSeq value |> List.toArray |> System.String

let n = readUint() |> decimal
let minute = List.min [for _ in [1..5] -> readUint() |> decimal]
ceil (n / minute)
|> uint64 
|> fun x -> x + 4UL
|> printfn "%d"