#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC target("sse4")
using namespace std;
template <class T>
bool ckmin(T& a, const T& b) {
  return b < a ? a = b, 1 : 0;
}
template <class T>
bool ckmax(T& a, const T& b) {
  return a < b ? a = b, 1 : 0;
}
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
const int MOD = 1000000007;
const char nl = '\n';
const int MX = 100001;
void solve() {
  long long N;
  int M;
  long long K;
  cin >> N >> M >> K;
  vector<long long> A(M);
  for (int i = 0; i < (M); i++) cin >> A[i];
  for (int i = 0; i < (M); i++) A[i]--;
  int p = 0;
  int ans = 0;
  while (p < M) {
    ans++;
    long long pos = A[p] - p;
    pos -= pos % K;
    pos += p;
    while (p < M && A[p] < pos + K) p++;
  }
  cout << ans << nl;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int T = 1;
  while (T--) {
    solve();
  }
  return 0;
}
