implicit none
integer(8)n,i
integer(8),dimension(5) ::a
integer(8) min_a



read(5,*)n
do i=1,5
read(5,*)a(i)

if(i.eq.1) then
min_a=a(i)
else if(min_a.ge.a(i)) then
min_a=a(i)
endif
enddo
 
write(6,*) n/min_a+5
 
end