#include <bits/stdc++.h>
using namespace std;
const long long oo = 1e18;
long long N, M, K;
vector<long long> vect;
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> N >> M >> K;
  for (long long i = 0; i < M; i++) {
    long long n;
    cin >> n;
    vect.push_back(n);
  }
  sort(vect.begin(), vect.end());
  reverse(vect.begin(), vect.end());
  long long cont = 0;
  long long res = 0;
  while (vect.size()) {
    long long temp = 0;
    long long special = (vect.back() - cont - 1) / K;
    while (vect.size() && (vect.back() - cont - 1) / K == special) {
      vect.pop_back();
      temp++;
    }
    res++;
    cont += temp;
  }
  cout << res << '\n';
  return 0;
}
