(stdin => {
  // Define Function
  const range = (start, end) => 
    Array.from(Array(end - start).keys(), v => v + start)
  
  const isDiviser = base => diviser => base % diviser === 0
  // Declare Variable
  const inputs = stdin.toString().trim().split('\n')
  const [a, b, c] = Array.from(inputs[0].split(' '), Number)
  const nlist = range(a, b + 1)
  // Main
  const diviser = isDiviser(c)
  const result = nlist.filter(diviser).length


  // Display
  console.log(result)

})(require('fs').readFileSync('/dev/stdin', 'utf8'))

