#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  long long n, m, k;
  cin >> n >> m >> k;
  set<long long> s;
  long long t = m;
  while (t--) {
    long long x;
    cin >> x;
    s.insert(x);
  }
  long long d = 0;
  long long ans = 0;
  while (d < m) {
    auto it = *(s.begin());
    long long page = (it - d - 1) / k;
    while (s.size() and (*s.begin() - d - 1) / k <= page) {
      s.erase(s.begin());
    }
    d = m - s.size();
    ans++;
  }
  cout << ans << "\n";
}
