import Control.Applicative
import Control.Monad
import Data.List
rInt s = read s :: Int

main = do
   [a, b, c] <- map rInt . words <$> getLine
   print $ length $ filter (\x -> (mod c x) == 0) [a..b]