program transport
  implicit none
  integer(8) n,a,b,c,d,e,neck
  read *, n
  read *, a
  read *, b
  read *, c
  read *, d
  read *, e
  neck = min(a,b,c,d,e)
  if (mod(n,neck) == 0 ) then
    print '(i0)', n/neck+4
  else
    print '(i0)', n/neck+5
  end if 
  stop
end program transport