#include <bits/stdc++.h>
using namespace std;
const int M = 1e5 + 50;
long long n, m, k, d[M], ans = 0, now = 1, sum = 0;
int main() {
  scanf("%lld%lld%lld", &n, &m, &k);
  for (int i = 1; i <= m; i++) scanf("%lld", &d[i]);
  while (now <= m) {
    long long r = ((d[now] - now) / k + 1) * k + now - 1;
    while (now <= m && d[now] <= r) now++;
    ans++;
  }
  cout << ans;
  return 0;
}
