#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr);
  long long n, m, k, ans = 0;
  cin >> n >> m >> k;
  vector<long long> vec(m);
  for (int i = 0; i < m; i++) cin >> vec[i];
  long long discarded = 0, cur_page = (vec[0] + k - 1) / k;
  long long ed = cur_page * k;
  for (int i = 0; i < m; i++) {
    if (vec[i] <= ed) {
      discarded++;
      continue;
    }
    if (!discarded) {
      cur_page = (vec[i] - ed + k - 1) / k;
      ed += cur_page * k;
    } else {
      ans++;
      ed += discarded;
      discarded = 0;
    }
    i--;
  }
  cout << ans + 1;
}
