#include <bits/stdc++.h>
using namespace std;
const long long N = 1e5 + 1;
long long n, m, k, pt;
long long p[N];
int main() {
  ios ::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> m >> k;
  for (int i = 1; i <= m; ++i) cin >> p[i];
  long long d, t, res;
  d = t = res = 0;
  for (int i = 1; i <= m; ++i) {
    t = (p[i] - d) / k;
    if ((p[i] - d) % k) ++t;
    long long tmp = 0;
    while (i <= m && p[i] - d <= t * k) ++i, ++tmp;
    --i;
    d += tmp;
    ++res;
  }
  cout << res;
  return 0;
}
