#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m, k;
  cin >> n >> m >> k;
  vector<long long> p(m + 1);
  for (int i = 1; i <= m; i++) cin >> p[i];
  int ans = 0, sum = 0, now = 1;
  while (now <= m) {
    long long r = ((p[now] - sum - 1) / k + 1) * k + sum;
    while (now <= m && p[now] <= r) {
      sum++;
      now++;
    }
    ans++;
  }
  cout << ans << endl;
  return 0;
}
