#include <bits/stdc++.h>
using namespace std;
const int maxn = 200010;
long long N, K;
int M;
long long a[maxn], ans;
int main() {
  scanf("%lld%d%lld", &N, &M, &K);
  for (int i = 1; i <= M; i++) scanf("%lld", &a[i]);
  sort(a + 1, a + M + 1);
  long long Now = 0;
  int tot = 0;
  while (tot < M) {
    long long P = (a[tot + 1] - tot - 1) / K + 1;
    long long R = P * K + tot;
    long long L = R - K + 1;
    int p1 = lower_bound(a + 1, a + M + 1, L) - a;
    int p2 = upper_bound(a + 1, a + M + 1, R) - a;
    p1 = max(p1, tot + 1);
    p2--;
    tot += p2 - p1 + 1;
    ans++;
  }
  printf("%lld\n", ans);
  return 0;
}
