#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long n, m, k, i, ans = 0, gone = 0, idx, x;
  cin >> n >> m >> k;
  long long arr[m + 4];
  for (i = 1; i <= m; i++) {
    cin >> arr[i];
  }
  long long now = 1;
  while (now <= m) {
    long long range, baki;
    x = arr[now] - gone;
    idx = x % k;
    if (idx == 0) {
      idx = k;
    }
    baki = (k - idx);
    range = arr[now] + baki;
    while (now <= m && arr[now] <= range) {
      gone++;
      now++;
    }
    ans++;
  }
  cout << ans << '\n';
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long t = 1;
  while (t--) {
    solve();
  }
}
