module Main where

import Control.Applicative
import Text.Printf

main :: IO ()
main = do
  { [a,b,c] <- getInts
  ; print(count 0 a b c)
  }

count :: Int -> Int -> Int -> Int -> Int
count n x y z
  | x > y          = n
  | z `mod` x == 0 = count (n+1) (x+1) y z
  | otherwise      = count n     (x+1) y z

--

getInts :: IO[Int]
getInts = map read . words <$> getLine

putInts :: [Int] -> IO ()
putInts = putStrLn . unwords . map show


