#include <bits/stdc++.h>
using namespace std;
void fastio() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
}
int main() {
  fastio();
  long long int T = 1;
  for (long long int test = 1; test <= T; test++) {
    long long int n, m, k, ans, cnt, sum;
    ans = 0;
    cnt = 0;
    sum = 0;
    cin >> n >> m >> k;
    long long int a[m];
    for (long long int i = 0; i < m; i++) cin >> a[i];
    long long int z = 0, it = 0, minus = 0;
    for (long long int i = 0; i < m; i++) {
      it = i + 1;
      cnt += (minus + 1);
      minus = 0;
      z = (a[i] - cnt) / k;
      ans++;
      while (it < m) {
        if (((a[it] - cnt)) / k == z) {
          it++;
          minus++;
        } else
          break;
      }
      i = it - 1;
    }
    cout << ans << endl;
  }
}
