#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, m, k;
  cin >> n >> m >> k;
  vector<long long int> arr(m);
  long long int s = 0;
  for (int i = 0; i < m; i++) {
    s++;
    cin >> arr[i];
  }
  long long int op = 0;
  long long int b = 1;
  long long int end = k;
  long long int removed = 0;
  long long int i = 0;
  long long int ans = 0;
  while (removed < m) {
    long long int curr = arr[i] - removed;
    long long int q = curr / k;
    long long int r = arr[i];
    if (curr % k != 0) {
      r = (q + 1) * k;
      r = r - curr + arr[i];
    }
    end = r;
    while (arr[i] <= end && i < arr.size()) {
      removed++;
      i++;
    }
    if (removed > 0) {
      ans++;
      end = end + removed;
    } else {
      end = end + k;
    }
  }
  cout << ans;
}
