(* O(1) *)
let div_ceil a b = if a mod b = 0 then a / b else a / b + 1

(* O(|ts|) *)
let solve n ts = div_ceil n (List.fold_left min max_int ts) + List.length ts - 1

let _ = Scanf.scanf "%d %d %d %d %d %d" (fun n a b c d e ->
  solve n [a; b; c; d; e] |> string_of_int |> print_string)