#include <bits/stdc++.h>
int main(void) {
  int a, b, c, d;
  scanf("%d %d %d", &a, &b, &c);
  for (a; a < b; a++) {
    if ((double)a / c - a / c == 0) {
      d = d + 1;
    }
  }
  printf("%d\n", d);
  return 0;
}
