#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m, k;
  cin >> n >> m >> k;
  long long a[m];
  for (int i = 0; i < m; i++) {
    cin >> a[i];
    a[i]--;
  }
  int nremoved = 0;
  int ans = 0;
  int i = 0;
  while (i < m) {
    long long page = (a[i] - nremoved) / k;
    while (i < m && (a[i] - nremoved) / k == page) {
      i++;
    }
    ans++;
    nremoved = i;
  }
  cout << ans << "\n";
}
