#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
int m, p;
long long ar[N];
long long n, k;
bool f;
long long tot_n;
long long cnt, former_cnt;
long long ans;
long long cc = 1;
int main() {
  scanf("%lld %d %lld", &n, &m, &k);
  if (n % k)
    tot_n = n / k + 1;
  else
    tot_n = n / k;
  for (int i = 1; i <= m; i++) {
    scanf("%lld", &ar[i]);
  }
  int i = 1;
  while (i <= m) {
    long long in = ar[i] - cnt;
    int t = cnt;
    while (ar[i] - t <= ((in - 1) / k + 1) * k) {
      i++;
      cnt++;
    }
    ans++;
  }
  cout << ans << endl;
  return 0;
}
