#include <bits/stdc++.h>
using namespace std;
long long a[100005];
queue<long long> q;
int main() {
  long long n, m, k;
  scanf("%lld %lld %lld", &n, &m, &k);
  for (int i = 1; i <= m; ++i) {
    scanf("%lld", &a[i]);
    q.push(a[i]);
  }
  int cnt = 0;
  long long ans = 0;
  while (!q.empty()) {
    long long u = q.front(), v;
    v = (u - ans) % k;
    if (v == 0) v = k;
    q.pop();
    ans++;
    cnt++;
    while (!q.empty() && q.front() - u <= k - v) {
      ans++;
      q.pop();
    }
    ans %= k;
  }
  printf("%d\n", cnt);
  return 0;
}
