#include <bits/stdc++.h>
using namespace std;
const int mod = 998244353;
void solve() {
  long long n, m, k;
  cin >> n >> m >> k;
  vector<long long> v(m);
  for (int i = 0; i < m; i++) {
    cin >> v[i];
  }
  long long ans = 0;
  long long hand = 0;
  long long now = 0;
  for (int i = 0; i < m; i++) {
    ans++;
    long long page = (v[i] - hand + k - 1) / k;
    long long f = 0;
    while (page == ((v[i] - hand + k - 1) / k)) {
      f++;
      i++;
    }
    i--;
    hand += f;
  }
  cout << ans << '\n';
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int tests = 1;
  while (tests--) {
    solve();
  }
}
