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