#include <bits/stdc++.h>
using namespace std;
long long p[200000 + 50];
int main() {
  ios::sync_with_stdio(false);
  long long n, m, k;
  cin >> n >> m >> k;
  for (long long i = 1; i <= m; i++) {
    cin >> p[i];
    p[i]--;
  }
  int pre = -1;
  int cnt = 0;
  long long ops = 0;
  long long sub = 0;
  for (int i = 1; i <= m; i++) {
    long long neww = (p[i] - sub) / k;
    if (neww != pre) {
      if (pre == -1) {
        pre = neww;
        cnt = 1;
      } else {
        ops++;
        sub += cnt;
        pre = (p[i] - sub) / k;
        cnt = 1;
      }
    } else {
      cnt++;
    }
  }
  if (cnt) {
    ops++;
  }
  cout << ops;
  return 0;
}
