#include <bits/stdc++.h>
using namespace std;
const long long MAXN = 1E5 + 2;
long long n, m, k;
vector<long long> p(MAXN);
long long page(long long index) { return 1 + (index - 1) / k; }
signed main() {
  cin >> n >> m >> k;
  for (long long i = 1; i <= m; ++i) cin >> p[i];
  long long firstIndex = 1, cur = firstIndex;
  long long ans = 0;
  while (firstIndex <= m) {
    cur = firstIndex;
    long long pageFirst = page(p[firstIndex] - firstIndex + 1);
    while (cur <= m && page(p[cur] - firstIndex + 1) == pageFirst) ++cur;
    ++ans;
    firstIndex = cur;
  }
  cout << ans;
}
