#include <bits/stdc++.h>
const long long MAX_N = 1e5 + 10;
const long long MAX_E = 1e5 + 10;
const long long MOD = 998244353;
using namespace std;
long long a[MAX_N];
long long n, m, k;
int main() {
  cin >> n >> m >> k;
  for (int i = 1; i <= m; ++i) scanf("%I64d", &a[i]);
  deque<long long> dq;
  long long last = 1;
  for (int i = 1; i <= m; ++i) {
    if (last < a[i]) {
      dq.push_back(a[i] - last);
      dq.push_back(-1);
    } else
      dq.push_back(-1);
    last = a[i] + 1;
  }
  if (dq.front() > k) {
    long long x = dq.front();
    dq.pop_front();
    x %= k;
    if (x) dq.push_front(x);
  }
  int ans = 0;
  int cnt = m;
  while (cnt) {
    long long len = 0;
    int j = 0;
    for (int i = 0; i < dq.size(); ++i) {
      if (dq[i] > 0)
        len += dq[i];
      else
        len++, cnt--;
      j = i;
      if (len >= k) break;
    }
    long long sum = 0;
    for (int i = 0; i <= j; ++i) {
      if (dq.front() > 0) sum += dq.front();
      dq.pop_front();
    }
    if (dq.size() and dq.front() > 0) {
      sum += dq.front();
      dq.pop_front();
    }
    sum %= k;
    if (sum) dq.push_front(sum);
    ans++;
  }
  cout << ans;
  return 0;
}
