#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m, k;
  cin >> n >> m >> k;
  long long a[100005];
  for (int i = 1; i <= m; i++) {
    cin >> a[i];
    a[i]--;
  }
  long long ans = 0, pos = 1, del, res;
  while (pos <= m) {
    del = pos - 1;
    res = (a[pos] - del) / k;
    for (; ((a[pos] - del) / k) == res; pos++)
      ;
    ans++;
  }
  cout << ans << endl;
  return 0;
}
