main = getLine >>= print . solve . input

-- 入力
input :: String -> [Int]
input = map read . words

-- 解答
solve [a, b, c] = count [a..b]
  where
    count = length . filter ok
    ok x = c `mod` x == 0
solve xs = -1
