program prob1
    implicit none
    integer(8) :: n, a, b, c, d, e, t
    
    read(*,*) n, a, b, c, d, e
    t = min(a, min(b, min(c,min(d, e))))
    write(*,*) (n-1)/t + 5

    stop
contains
end program prob1