#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  long long ans = 0;
  bool f = 1;
  char ch = getchar();
  while (!isdigit(ch)) f ^= ch == '-', ch = getchar();
  while (isdigit(ch)) ans = ((ans << 2) + ans << 1) + (ch ^ 48), ch = getchar();
  return f ? ans : -ans;
}
const int N = 1e5 + 5;
long long n, k, p[N];
int m;
int main() {
  cin >> n >> m >> k;
  if (!m) return cout << 0, 0;
  for (register int i = 1; i <= m; ++i) p[i] = read();
  int turnn = 1, det = 0;
  long long mxpos = ((p[1] - 1) / k + 1) * k;
  for (register int i = 2; i <= m; ++i) {
    if (p[i] - det <= mxpos) continue;
    det = i - 1;
    p[i] -= i - 1;
    mxpos = ((p[i] - 1) / k + 1) * k;
    ++turnn;
  }
  cout << turnn;
  return 0;
}
