program number_of_multiples
  implicit none
  integer :: l, r, d, i, x = 0
  read(*,*) l, r, d
  do i = l, r
    if (mod(i, d) == 0) x = x + 1
  end do
  write(*,'(i0)') x
end program number_of_multiples