#include <bits/stdc++.h>
using namespace std;
const int maxm = 1e5 + 18;
long long n, k;
long long Begin, Finish;
int m;
long long a[maxm];
long long ans;
void Input() {
  cin >> n >> m >> k;
  for (int i = 1; i <= m; i++) {
    cin >> a[i];
  }
}
void Output() {
  int cur = 0;
  while (true) {
    long long xx = (a[cur + 1] - 1 - cur) / k;
    Begin = 1 + xx * k;
    Finish = Begin + k - 1;
    int lo = cur + 1, hi = m, res = -1;
    while (lo <= hi) {
      int mid = (lo + hi) >> 1;
      if (a[mid] - cur <= Finish) {
        res = mid;
        lo = mid + 1;
      } else
        hi = mid - 1;
    }
    assert(res != -1);
    ans++;
    int len = (res - cur);
    cur += len;
    if (cur >= m) break;
  }
  cout << ans;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  Input();
  Output();
  return 0;
}
