#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m, k;
  cin >> n >> m >> k;
  long long p[m];
  for (int i = 0; i < m; i++) cin >> p[i];
  long long currcount = 0, rescount = 0, pgno, currpgno, opcount = 0;
  currpgno = (p[0] - 1) / k;
  for (int i = 0; i < m; i++) {
    pgno = (p[i] - currcount - 1) / k;
    if (pgno == currpgno) {
      rescount++;
    } else {
      opcount++;
      currcount = rescount;
      currpgno = (p[i] - rescount - 1) / k;
      rescount++;
    }
  }
  cout << opcount + 1;
  return 0;
}
