#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long int page = 1, count = 0, start, endt, n, m, k, i, j, num;
  cin >> n >> m >> k;
  vector<long long int> a(m);
  for (i = 0; i < m; i++) cin >> a[i];
  sort(a.begin(), a.end());
  if (a[m - 1] <= k) {
    cout << 1 << "\n";
    return 0;
  }
  endt = k;
  vector<long long int>::iterator it, it1, it2 = a.begin();
  for (; it2 != a.end();) {
    it1 = upper_bound(it2, a.end(), endt);
    num = it1 - it2;
    if (num == 0) {
      long long int temp = (*it1) - endt;
      if (temp % k != 0)
        endt = endt + (temp / k) * k + k;
      else
        endt = endt + temp;
    } else
      count++;
    endt = endt + num;
    it2 = it1;
  }
  cout << count << "\n";
  return 0;
}
