#include <bits/stdc++.h>
using namespace std;
int main() {
  std::ios::sync_with_stdio(false);
  std::cin.tie(0);
  long long n, m, k;
  cin >> n >> m >> k;
  vector<long long> a(m);
  for (int i = 0; i < m; ++i) {
    cin >> a[i];
    --a[i];
  }
  sort(a.begin(), a.end());
  long long p = 0, res = 0;
  while (p < n) {
    int i = lower_bound(a.begin(), a.end(), p) - a.begin();
    if (i >= a.size()) break;
    p += (a[i] - p) / k * k;
    int c = 0;
    while (i + c < a.size() && a[i + c] < p + k + c) {
      ++res;
      int j = lower_bound(a.begin(), a.end(), p + k + c) - a.begin();
      c = j - i;
    }
    p += k + c;
  }
  cout << res << endl;
  return 0;
}
