#include <bits/stdc++.h>
template <typename A, typename B>
inline char smax(A &a, const B &b) {
  return a < b ? a = b, 1 : 0;
}
template <typename A, typename B>
inline char smin(A &a, const B &b) {
  return b < a ? a = b, 1 : 0;
}
template <typename I>
inline void read(I &x) {
  int f = 0, c;
  while (!isdigit(c = getchar())) c == '-' ? f = 1 : 0;
  x = c & 15;
  while (isdigit(c = getchar())) x = (x << 1) + (x << 3) + (c & 15);
  f ? x = -x : 0;
}
const int N = 1e5 + 7;
long long n, k;
int m, red;
long long a[N];
bool del[N];
inline long long pag(long long x) { return (x - red - 1) / k + 1; }
inline void work() {
  int ans = 0;
  for (int i = 1; i <= m; ++i) {
    if (del[i]) continue;
    long long p = pag(a[i]);
    int l = i, r = m;
    while (l < r) {
      int mid = (l + r + 1) >> 1;
      if (pag(a[mid]) == p)
        l = mid;
      else
        r = mid - 1;
    }
    ++ans;
    red += l - i + 1;
    for (int j = i; j <= l; ++j) del[j] = 1;
  }
  printf("%d\n", ans);
}
inline void init() {
  read(n), read(m), read(k);
  for (int i = 1; i <= m; ++i) read(a[i]);
}
int main() {
  init();
  work();
  fclose(stdin), fclose(stdout);
  return 0;
}
