let n = read_int()
let a = read_int()
let b = read_int()
let c = read_int()
let d = read_int()
let e = read_int()
let l = [a; b; c; d; e]

let f lst n =
  let l_min = List.fold_right min lst max_int in
  if n mod l_min = 0 then (n / l_min) + 4
  else (n / l_min) + 5
  
let () = print_int (f l n)