#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m, k;
  cin >> n >> m >> k;
  long long p[m + 1];
  for (long long i = 1; i < m + 1; i++) cin >> p[i];
  long long ans = 0, rem = 0, pg, temp;
  if (p[1] % k == 0)
    pg = p[1] % k;
  else
    pg = (p[1] % k) + 1;
  for (long long i = 1; i < m + 1; i++) {
    if ((p[i] - rem) % k == 0)
      temp = (p[i] - rem) / k;
    else
      temp = ((p[i] - rem) / k) + 1;
    if (temp != pg) {
      ans++;
      rem = i - 1;
      if ((p[i] - rem) % k == 0)
        pg = (p[i] - rem) / k;
      else
        pg = ((p[i] - rem) / k) + 1;
    }
  }
  cout << ans;
  return 0;
}
