#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
template <typename T>
bool uax(T &a, const T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <typename T>
bool uin(T &a, const T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <typename T1, typename T2>
istream &operator>>(istream &in, pair<T1, T2> &p) {
  in >> p.first >> p.second;
  return in;
}
template <typename T1, typename T2>
ostream &operator<<(ostream &out, pair<T1, T2> &p) {
  out << p.first << ' ' << p.second;
  return out;
}
mt19937 rnd(1928);
long long n, m, k;
vector<long long> a;
long long get_kn(long long q) { return q + (k - 1 - (q % k)); }
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cin >> n >> m >> k;
  a.resize(m);
  for (int i = 0; i < m; i++) {
    cin >> a[i];
    a[i]--;
  }
  int ind = 0;
  int ans = 0;
  while (ind < m) {
    long long w = get_kn(a[ind] - ind);
    int l = 0, r = m - ind, mid;
    while (r > l + 1) {
      mid = (l + r) / 2;
      if (a[ind + mid] - ind <= w) {
        l = mid;
      } else {
        r = mid;
      }
    }
    ans++;
    ind += r;
  }
  cout << ans;
}
