#include <bits/stdc++.h>
using namespace std;
const int maxn = 100000 + 10;
long long n, m, k;
queue<long long> q;
int main() {
  cin >> n >> m >> k;
  for (int i = 0; i < m; i++) {
    long long tmp;
    cin >> tmp;
    q.push(tmp);
  }
  int ans = 0;
  long long cnt;
  if (!q.empty()) {
    long long tmp = q.front();
    cnt = ((tmp - 1) / k + 1) * k;
  }
  while (1) {
    long long tmp = 0;
    if (q.empty()) {
      break;
    }
    long long tt = q.front();
    if ((tt % k) == (cnt % k))
      cnt = tt;
    else if ((tt % k) < (cnt % k))
      cnt = (tt / k) * k + cnt % k;
    else
      cnt = (tt / k + 1) * k + cnt % k;
    while (!q.empty()) {
      if (q.front() <= cnt)
        tmp++, q.pop();
      else
        break;
    }
    if (tmp) ans++, cnt += tmp;
  }
  cout << ans << endl;
  return 0;
}
