import Control.Applicative
import Data.List

main = do
  [a,b,c] <- map (read ::String -> Int) . words <$> getLine
  print $ countDivs a b c

countDivs a b c = length  $ filter (\x -> a<=x && b>=x) $ divisorList c
  where
    divisorList :: Int -> [Int]
    divisorList c = divisor c c []
      where
        divisor :: Int -> Int -> [Int] -> [Int]
        divisor c n xs
          | n == 1 = 1:xs
          | c `mod` n == 0 = divisor c (n-1) (n:xs)
          | otherwise = divisor c (n-1) xs