#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m, k;
  cin >> n >> m >> k;
  vector<long long> a(m);
  for (long long i = 0; i < m; ++i) scanf("%lld", &a[i]), --a[i];
  long long ans = 0;
  for (long long i = 0; i < m;) {
    ans++;
    long long pos = ((a[i] - i) % k + k) % k;
    long long lst = a[i] + k - pos;
    for (; i < m && a[i] < lst; ++i)
      ;
  }
  cout << ans;
}
