program main
  implicit none
  integer(8) n, time(5), nekku
  read(*, *) n
  read(*, *) time(1)
  read(*, *) time(2)
  read(*, *) time(3)
  read(*, *) time(4)
  read(*, *) time(5)
  nekku = min(time(1),time(2),time(3),time(4),time(5))
  if (mod(N,nekku) == 0) then
    write(*, '(i0)') (N/nekku)+4
  else
    write(*, '(i0)') (N/nekku)+5
  end if
end program main