#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL);
  ;
  long long n, m, k;
  cin >> n >> m >> k;
  long long p[m];
  for (long long i = 0; i < m; i++) cin >> p[i];
  long long i = 0, ans = 0, c = 0;
  while (i < m) {
    long long sp = (p[i] - 1 - c) / k;
    long long c2 = 0;
    while (i < m && (p[i] - 1 - c) / k == sp) c2++, i++;
    if (c2) ans++;
    c += c2;
  }
  cout << ans;
  return 0;
}
