#include <bits/stdc++.h>
using namespace std;
const int N = 4e5 + 100;
long long arr[N];
long long dat[N];
int Left[N], Right[N];
long long flag[N];
void build(int p, int l, int r) {
  Left[p] = l;
  Right[p] = r;
  if (l == r) {
    dat[p] = arr[l];
    return;
  }
  int mid = (l + r) >> 1;
  build(2 * p, l, mid);
  build(2 * p + 1, mid + 1, r);
  dat[p] = dat[2 * p] + dat[2 * p + 1];
}
void spread(int p) {
  if (!flag[p]) return;
  dat[2 * p] += flag[p] * (Right[2 * p] - Left[p * 2] + 1);
  dat[2 * p + 1] += flag[p] * (Right[2 * p + 1] - Left[p * 2 + 1] + 1);
  flag[2 * p] += flag[p];
  flag[2 * p + 1] += flag[p];
  flag[p] = 0;
}
void change(int p, int l, int r, long long v) {
  if (l <= Left[p] && r >= Right[p]) {
    dat[p] += v * (Right[p] - Left[p] + 1);
    flag[p] += v;
    return;
  }
  int mid = (Left[p] + Right[p]) >> 1;
  spread(p);
  if (l <= mid) change(p * 2, l, r, v);
  if (r > mid) change(2 * p + 1, l, r, v);
  dat[p] = dat[p * 2] + dat[2 * p + 1];
}
long long ask(int p, int l, int r) {
  if (l <= Left[p] && r >= Right[p]) return dat[p];
  int mid = (Left[p] + Right[p]) >> 1;
  long long val = 0;
  spread(p);
  if (l <= mid) val += ask(p * 2, l, r);
  if (r > mid) val += ask(2 * p + 1, l, r);
  return val;
}
void update(int x, int y, long long num) { change(1, x, y, -num); }
int main() {
  long long n, m, k, group, pre, ans, num;
  while (cin >> n >> m >> k) {
    memset(arr, 0, sizeof(arr));
    for (int i = 1; i <= m; i++) cin >> arr[i];
    memset(dat, 0, sizeof(dat));
    memset(Left, 0, sizeof(Left));
    memset(Right, 0, sizeof(Right));
    memset(flag, 0, sizeof(flag));
    sort(arr + 1, arr + 1 + m);
    build(1, 1, m);
    pre = num = ans = 0;
    for (int i = 1; i <= m; i++) {
      long long tmp = ask(1, 1, i) - ask(1, 1, i - 1);
      group = tmp / k;
      if (tmp % k != 0) group++;
      num++;
      if (group != pre) {
        ans++;
        update(i, m, num - 1);
        tmp = ask(1, 1, i) - ask(1, 1, i - 1);
        group = tmp / k;
        if (tmp % k != 0) group++;
        pre = group;
        num = 1;
      }
    }
    cout << ans << endl;
  }
  return 0;
}
