#include <bits/stdc++.h>
using namespace std;
vector<long long> v;
const int maxn = 1e5 + 11;
int main() {
  long long n, m, k, sum, l = 0;
  long long ans = 0, num = 0, fend, chu;
  scanf("%lld%lld%lld", &n, &m, &k);
  for (int i = 1; i <= m; i++) {
    scanf("%lld", &sum);
    v.push_back(sum);
  }
  sort(v.begin(), v.end());
  while (l != v.size()) {
    long long x = v[l] - num;
    if (x % k == 0)
      chu = x / k;
    else
      chu = x / k + 1;
    fend = chu * k;
    int pos = lower_bound(v.begin(), v.end(), fend + num + 1) - v.begin() - l;
    ++ans;
    num += pos;
    l += pos;
  }
  printf("%lld\n", ans);
}
