#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e+7;
const int N = 1e5 + 5;
long long pwr(long long x, long long y);
long long a[N];
vector<long long> v;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n, m, k;
  cin >> n >> m >> k;
  for (int i = 0; i < m; i++) {
    cin >> a[i];
    v.push_back(a[i]);
  }
  long long ans = 0, l = k;
  long long cur = 0, pre = 0;
  while (pre < m) {
    cur = (upper_bound(v.begin(), v.end(), l) - v.begin());
    if (cur == pre) {
      long long po = (v[cur] - l) / k;
      l += (long long)(po + bool((v[cur] - l) % k)) * k;
    } else {
      l += (cur - pre);
      ans++;
    }
    pre = cur;
  }
  cout << ans << endl;
  return 0;
}
long long pwr(long long x, long long y) {
  long long ans = 1;
  x = x % mod;
  while (y > 0) {
    if (y & 1) ans = (x * (ans % mod)) % mod;
    x = (x * x) % mod;
    y = y / 2;
  }
  return ans % mod;
}
