#include <bits/stdc++.h>
using namespace std;
const int MAXM = 100 * 1000 + 12;
long long n, m, k, p[MAXM];
int main() {
  cin >> n >> m >> k;
  for (int i = 0; i < m; i++) cin >> p[i], p[i]--;
  p[m] = LLONG_MAX;
  long long tmp = 0, page = 0, ans = 0, h;
  while (tmp < m) {
    h = tmp;
    page = ((p[tmp] - h) / k);
    while (tmp < m && (p[tmp] - h) / k == page) tmp++;
    ans++;
  }
  cout << ans;
  return 0;
}
