#include <bits/stdc++.h>
using namespace std;
long long n, m, k, ans, p[100001];
int main() {
  scanf("%lld %lld %lld", &n, &m, &k);
  for (long long i = 1; i <= m; i++) scanf("%lld", &p[i]);
  for (long long i = 1; i <= m;) {
    i = upper_bound(p + i + 1, p + m + 1, ((p[i] - i) / k + 1) * k + i - 1) - p;
    ans++;
  }
  printf("%lld", ans);
}
