program main
  implicit none

1 format(i0)
  
  integer*8 N,v(1:5),tmp2,tmp3,i
  integer(8) tmp1
  
  read(*,*) N
  read(*,*) v(1)
  read(*,*) v(2)
  read(*,*) v(3)
  read(*,*) v(4)
  read(*,*) v(5)
  
  tmp1 = min(v(1),v(2),v(3),v(4),v(5))
  
  tmp2 = N / tmp1
  tmp3 = mod(N,tmp1)
  
  if (tmp3 == 0) then
     write(*,1) (tmp2+4)
  else
     write(*,1) (tmp2+5)
  end if
end program main
  