#include <bits/stdc++.h>
using namespace std;
template <typename T>
using vc = vector<T>;
using pii = pair<long long, long long>;
void xmax(long long& a, long long b) { a = max(a, b); }
void xmin(long long& a, long long b) { a = min(a, b); }
void print(vc<long long>& a, string second) {
  cerr << second << " : ";
  for (long long i = 0; i < a.size(); i++) {
    cerr << a[i] << " ";
  }
  cerr << endl;
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  long long n, m, k;
  cin >> n >> m >> k;
  long long anz = 0;
  vc<long long> a(m);
  for (long long i = 0; i < m; i++) {
    cin >> a[i];
  }
  long long pos = a[0];
  long long ind = 0;
  while (ind < m) {
    long long last_on_page = ind;
    long long cur_anz = 1;
    long long l;
    if (pos % k == 0)
      l = pos;
    else
      l = (pos / k) * k + k;
    anz++;
    for (long long k = ind + 1; k < m; k++) {
      long long r = pos + a[k] - a[ind];
      if (r > l)
        break;
      else
        cur_anz++;
    }
    if (ind + cur_anz < m) {
      pos = a[ind + cur_anz] - a[ind] + pos - cur_anz;
    }
    ind += cur_anz;
  }
  cout << anz << "\n";
}
