#include <bits/stdc++.h>
using namespace std;
constexpr long long MOD = 1e9 + 7;
int main() {
  ios_base::sync_with_stdio(0);
  long long n, m, k;
  cin >> n >> m >> k;
  vector<long long> p;
  for (int i = 0; i < m; ++i) {
    long long x;
    cin >> x;
    p.push_back(x);
  }
  long long cur = 1;
  int next = 0;
  long long ans = 0;
  while (next < m) {
    long long x = p[next] - cur + 1;
    long long n = x / k + (x % k ? 1 : 0);
    long long val = k * n + cur - 1;
    long long first = val - k + 1;
    int lo = next, hi = m - 1, upp;
    while (lo <= hi) {
      int mid = (lo + hi) / 2;
      if (p[mid] <= val) {
        upp = mid;
        lo = mid + 1;
      } else
        hi = mid - 1;
    }
    int cnt = upp - next + 1;
    ans++;
    next += cnt;
    cur = first + cnt;
  }
  cout << ans << endl;
  return 0;
}
