#include <bits/stdc++.h>
using namespace std;
const long long int INF = (long long)1e15;
const unsigned long long mod = 1e9 + 7;
bool cmp(const pair<int, int> &a, const pair<int, int> &b) {
  return (a.first >= b.second);
}
void solve() {
  long long n, m, k;
  cin >> n >> m >> k;
  long long a[m];
  for (int i = 0; i < m; i++) cin >> a[i];
  long long ans = 0, i = 0, fac = 0;
  while (i < m) {
    long long r = ((a[i] - fac - 1) / k + 1) * k + fac;
    while (i < m && a[i] <= r) {
      fac++;
      i++;
    }
    ans++;
  }
  cout << ans << endl;
}
int main() {
  int t = 1;
  while (t--) {
    solve();
  }
}
