import Control.Applicative

main :: IO ()
main = do
  xs <- (map read . words) <$> getLine
  putStrLn $ show (solve (xs !! 0) (xs !! 1) (xs !! 2))

solve :: Int -> Int -> Int -> Int
solve a b c
  | a > b = 0
  | (mod c a) == 0 = 1 + solve (a + 1) b c
  | otherwise = solve (a + 1) b c


  