'use strict';
(function(stdin) {

  var inputs = stdin.toString().split('\n');
  var cols   = inputs[0].split(' ').map(Number);
  var result = (function(numbers, divisable) {

    return  numbers.filter(divisable).length;

  })(range(cols[0], cols[1]), isDivisable(cols[2]));

  console.log(result);

  function range(n, m) {
    var array = [];

    for (var i = n; i < m + 1; i++) {
      array.push(i);
    }
    return array;
  }

  function isDivisable(diviser) {
    return function(n) {
      return diviser % n === 0;
    };
  }

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