#include <bits/stdc++.h>
using namespace std;
const int maxm = 1e5 + 10;
long long a[maxm];
long long b[maxm];
long long n, m, k;
int main() {
  cin >> n >> m >> k;
  for (int i = 0; i < m; i++) {
    cin >> a[i];
    a[i]--;
    b[i] = a[i] / k;
  }
  long long t, f;
  int cnt = 1, dis = 1;
  int i = 1;
  for (; i < m; i++) {
    if (b[i] != b[0]) {
      cnt++;
      dis = i;
      break;
    }
  }
  f = (a[i] - dis) / k;
  i++;
  for (; i < m; i++) {
    if ((a[i] - dis) / k == f)
      continue;
    else {
      cnt++;
      dis = i;
      f = (a[i] - dis) / k;
    }
  }
  cout << cnt;
  return ~~(0 - 0);
}
