#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9;
const int MOD = 1e9 + 7;
void solve() {
  long long n, m, k;
  cin >> n >> m >> k;
  vector<long long> p(m);
  for (long long& e : p) cin >> e;
  long long ans = 0;
  long long first, last;
  long long kDel = 0;
  first = last = 0;
  while (last < m) {
    first = last;
    long long numPage = ((p[first] - kDel) + k - 1) / k;
    while (last < m && ((p[last] - kDel) + k - 1) / k == numPage) last++;
    kDel += last - first;
    ans++;
  }
  cout << ans;
}
int main() {
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
