#include <bits/stdc++.h>
using namespace std;
long long p[100010];
int main() {
  long long n, m, k;
  cin >> n >> m >> k;
  for (int i = 0; i < m; i++) {
    cin >> p[i];
  }
  int pt = 0;
  int ans = 0;
  int cnt = 0;
  long long page = k;
  while (pt < m) {
    if (p[pt] - cnt > k) {
      page = (p[pt] - cnt + k - 1) / k * k;
    }
    int tmp = 0;
    while (pt < m && p[pt] - cnt <= page) {
      pt++;
      tmp++;
    }
    cnt += tmp;
    ans++;
  }
  cout << ans;
}
