#include <bits/stdc++.h>
using namespace std;
const int maxn = 100003;
long long n, m, k, a[maxn];
int main() {
  scanf("%lld%lld%lld", &n, &m, &k);
  for (long long i = 1; i <= m; i++) scanf("%lld", a + i);
  long long ans = 0;
  for (long long i = 1, j = 1; i <= m; i = j) {
    for (; j <= m && (a[i] - i) / k == (a[j] - i) / k; j++)
      ;
    ans++;
  }
  printf("%lld\n", ans);
  return 0;
}
