#include <bits/stdc++.h>
using namespace std;
template <class T>
inline void _read(T &x) {
  x = 0;
  char tmp = getchar();
  while (!isdigit(tmp)) tmp = getchar();
  while (isdigit(tmp)) {
    x = x * 10 + tmp - '0';
    tmp = getchar();
  }
}
long long n, m, k;
const int MAXN = 1e6 + 10;
long long a[MAXN];
int use = 0, cnt = 0;
bool ok(long long now, long long tmp) {
  return (now - use - 1) / k == (tmp - use - 1) / k;
}
int main() {
  _read(n), _read(m);
  _read(k);
  for (int i = 1; i <= m; ++i) _read(a[i]);
  for (int i = 1, j = 1; i <= m; j = i) {
    while (ok(a[i], a[j + 1]) && j + 1 <= m) ++j;
    use += j - i + 1;
    i = j + 1;
    ++cnt;
  }
  printf("%d\n", cnt);
  return 0;
}
