program five_transportations
    implicit none
    integer(8):: n,a,b,c,d,e

    read*, n
    read*, a
    read*, b
    read*, c
    read*, d
    read*, e

    print*, ceiling(dble(n)/dble(minval([a,b,c,d,e])),kind=8) + 4
end program five_transportations