#include <bits/stdc++.h>
using namespace std;
const long long N = 1e5 + 200;
const long long LIM = N;
const long long MOD = 1e9 + 7;
long long n, m, k, l, a[N], ans, res, kol;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m >> k;
  for (int i = 1; i <= m; i++) cin >> a[i];
  l = (a[1] / k + (a[1] % k != 0));
  for (int i = 1; i <= m; i++) {
    a[i] -= res;
    if (a[i] > l * k) {
      ans++;
      res += kol;
      a[i] -= kol;
      l = (a[i] / k + (a[i] % k != 0));
      kol = 1;
    } else
      kol++;
  }
  if (kol) ans++;
  cout << ans;
  return 0;
}
