module Main (main) where

import Control.Applicative

solve :: Int -> Int -> Int -> Int
solve a b c = length $ factors a b c []

factors :: Int -> Int -> Int -> [Int] -> [Int]
factors a b c xs
  | a > b          = xs
  | c `mod` b == 0 = factors a (b - 1) c (b:xs)
  | otherwise      = factors a (b - 1) c xs

main :: IO ()
main = do
  [a, b, c] <- map read . words <$> getLine
  putStrLn $ show $ solve a b c