#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 100;
long long p[N];
int main() {
  long long n, m, k;
  scanf("%lld%lld%lld", &n, &m, &k);
  for (int i = 0; i < m; i++) scanf("%lld", &p[i]);
  sort(p, p + m);
  int ans = 0;
  int i = 0;
  int cnt = 0;
  while (i < m) {
    long long b = ((p[i] - cnt - 1) / k + 1) * k + cnt;
    while (i < m && p[i] <= b) i++, cnt++;
    ans++;
  }
  printf("%d\n", ans);
  return 0;
}
