#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m, k;
  scanf("%lld %lld %lld", &n, &m, &k);
  long long p[100005];
  for (int i = 0; i < m; i++) {
    scanf("%lld", &p[i]);
  }
  long long last = -1, sub = 0;
  long long tmpsub = 0;
  long long ans = -1;
  for (int i = 0; i < m; i++) {
    if ((p[i] - sub - 1) / k != last) {
      sub += tmpsub;
      tmpsub = 1;
      ans++;
      last = (p[i] - sub - 1) / k;
    } else {
      tmpsub++;
    }
  }
  ans++;
  printf("%lld\n", ans);
}
