#include <bits/stdc++.h>
using namespace std;
const int N = 1e6;
long long a[N + 2];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long n, m, k;
  cin >> n >> m >> k;
  for (int i = 1; i <= m; i++) cin >> a[i];
  int ans = 0;
  long long b = 1;
  for (int i = 1; i <= m;) {
    long long tm = (a[i] - b) / k;
    b += tm * k;
    int cnt = 0;
    for (int j = i; j <= m; j++) {
      if (a[j] >= b + k)
        break;
      else
        cnt++;
    }
    ans++;
    i += cnt;
    b += cnt;
  }
  cout << ans << '\n';
  return 0;
}
