#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 10;
long long p[maxn], n, m, k;
int main() {
  cin >> n >> m >> k;
  for (int i = 0; i < m; i++) cin >> p[i];
  long long sum = 0, ans = 0;
  int i = 0;
  while (i < m) {
    long long x = p[i] - sum;
    long long e = x / k * k + k * (x % k == 0 ? 0 : 1);
    ans++;
    long long tmp = sum;
    while (i < m && p[i] - tmp <= e) {
      i++;
      sum++;
    }
  }
  cout << ans << endl;
}
