#include <bits/stdc++.h>
using namespace std;
using t = long long;
int main() {
  t n, m, k;
  cin >> n >> m >> k;
  vector<t> l(m);
  for (auto it = l.rbegin(); it != l.rend(); it++) {
    cin >> *it;
    (*it)--;
  }
  if (k == 1) {
    cout << m;
    return 0;
  }
  t opCounter = 0, remCounter = 0, page, remCounterTemp;
  while (!l.empty()) {
    remCounterTemp = remCounter;
    page = (l.back() - remCounterTemp) / k;
    while (!l.empty() && (l.back() - remCounterTemp) / k == page) {
      l.pop_back();
      remCounter++;
    }
    opCounter++;
  }
  cout << opCounter;
  return 0;
}
