#include <bits/stdc++.h>
using namespace std;
const long long N = 1e5 + 10;
long long p[N], n, m, k;
signed main() {
  scanf("%lld%lld%lld", &n, &m, &k);
  for (long long i = 1; i <= m; i++) scanf("%lld", &p[i]);
  long long ans = 0, tag = 0;
  for (long long l = 1, r; l <= m; l = r + 1) {
    long long page = (p[l] - tag - 1) / k;
    for (r = l + 1; r <= m && (p[r] - tag - 1) / k == page; r++)
      ;
    r--;
    tag += (r - l + 1);
    ans++;
  }
  printf("%lld\n", ans);
  return 0;
}
