#include <bits/stdc++.h>
using namespace std;
using LL = long long;
const int N = 1e5 + 10;
LL a[N];
int main() {
  LL n, k;
  int m;
  scanf("%lld%d%lld", &n, &m, &k);
  for (int i = 1; i <= m; i++) scanf("%lld", a + i);
  int ans = 0;
  for (int i = 1; i <= m;) {
    int del = i - 1;
    LL cur = a[i] - del;
    LL last = (cur - 1) / k * k + k;
    while (i <= n && a[i] - del <= last) i++;
    ans++;
  }
  printf("%d\n", ans);
  return 0;
}
