import Control.Applicative
    
solve :: Int -> Int -> Int -> Int

solve a b c
    = length [x | x <- [a..b], mod c x == 0]

input :: Read a => IO [a]

input
    = map read.words <$> getLine

output :: Show a => a -> String

output x
    = show x
                
main :: IO ()
    
main
    = do
        [a, b, c] <- input
        putStrLn $ output $ solve a b c