#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, x, y, z;
  y = 0;
  cin >> a >> b >> c;
  z = b - a - 1;
  for (x = 0; x < z; x++) {
    if (a % c == 0) y++;
  }
  cout << y << endl;
  return 0;
}
