      PROGRAM piyo
      IMPLICIT NONE
      INTEGER,PARAMETER :: p = 16
      integer(p) :: l,r,d,ans=0,cnt,temp
      
      read*,l,r,d
      cnt = 1
      do while(.true.)
        temp = d*cnt
        if( l<=temp.and.temp<=r )then
          ans = ans + 1
        end if
        
        if( temp>r ) exit
        
        cnt = cnt + 1
      end do
      
      print*,ans
      
      
      stop
      !debugg
      
      
      
      END PROGRAM