#include <bits/stdc++.h>
using namespace std;
int main() {
  unsigned long long int n, m, k;
  cin >> n >> m >> k;
  unsigned long long int a[m];
  for (auto &x : a) cin >> x, x--;
  unsigned long long int cnt = 0;
  unsigned long long int p = 0;
  for (unsigned long long int i = 0; i < m;) {
    unsigned long long int sp = (a[i] - i) / k;
    sp *= k;
    sp += p;
    for (; i < m; i++) {
      if (a[i] >= sp + k) {
        break;
      }
      p = (p + 1);
    }
    cnt++;
  }
  cout << cnt << '\n';
  return 0;
}
