#include <bits/stdc++.h>
using namespace std;
long long power(long long n, long long m) {
  long long p = 1;
  if (m == 0) return 1;
  p = (power(n, m / 2) % 1000000007);
  p = (p % 1000000007 * p % 1000000007) % 1000000007;
  return (m & 1 ? ((p % 1000000007 * n % 1000000007) % 1000000007)
                : (p % 1000000007));
}
void solve() {
  long long n, m, k;
  cin >> n >> m >> k;
  long long p[m + 1];
  for (long long i = 1; i < m + 1; i++) cin >> p[i];
  long long now = 1, sum = 0, ans = 0;
  while (now <= m) {
    long long r = ((p[now] - sum - 1) / k + 1) * k + sum;
    while (p[now] <= r && now <= m) {
      sum++;
      now++;
    }
    ++ans;
  }
  cout << ans << "\n";
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long t = 1;
  while (t--) solve();
  cerr << (float)clock() / CLOCKS_PER_SEC * 1000 << " ms"
       << "\n";
  return 0;
}
