object Main extends App {
  val sc = new java.util.Scanner(System.in)
  val a, b, c = sc.nextInt()
  val divisors = getDivisorList(c,1)
  val range = (a to b).toList
  println(range.intersect(divisors).size)

  def getDivisorList(target: Int, start: Int): List[Int] = {
    if (target == start)
      List(target)
    else if (target % start == 0)
      start :: getDivisorList(target, start + 1)
    else
      getDivisorList(target, start + 1)
  }
}