#include <bits/stdc++.h>
using namespace std;
long long a[100010];
int main() {
  long long n, k;
  int m;
  while (~scanf("%lld %d %lld", &n, &m, &k)) {
    for (int i = 1; i <= m; i++) {
      scanf("%lld", &a[i]);
    }
    int sumdiscard = 0, ans = 0, _begin = 1;
    long long curpage = k;
    while (sumdiscard < m) {
      if (curpage + sumdiscard >= a[_begin]) {
        int cnt = 0;
        while (_begin <= m && curpage + sumdiscard >= a[_begin]) {
          _begin++;
          cnt++;
        }
        sumdiscard += cnt;
        ans++;
      } else {
        curpage = (a[_begin] - sumdiscard + k - 1) / k * k;
      }
    }
    printf("%d\n", ans);
  }
}
