#include <bits/stdc++.h>
using namespace std;
const int maxn = 3e5 + 5;
const int mod = 1e9 + 7;
long long qpow(long long a, long long b) {
  long long ans = 1;
  a %= mod;
  assert(b >= 0);
  for (; b; b >>= 1) {
    if (b & 1) ans = ans * a % mod;
    a = a * a % mod;
  }
  return ans;
}
long long gcd(long long a, long long b) { return b > 0 ? gcd(b, a % b) : a; }
struct node {
  long long pos, w, b;
};
long long a[maxn];
int main() {
  long long n, m, T, k;
  cin >> n >> k >> m;
  queue<node> q;
  for (int i = 1; i <= k; i++) {
    cin >> T;
    a[i] = T;
    q.push({T, (T - 1ll) / m, (T - 1ll) % m});
  }
  long long t = (a[1] - 1ll) / m, del = 0;
  long long ans = 0;
  while (!q.empty()) {
    long long D = del;
    while (!q.empty()) {
      node temp = q.front();
      if ((temp.pos - D - 1) / m == t) {
        q.pop();
        del++;
      } else {
        break;
      }
    }
    ans++;
    if (!q.empty()) {
      node temp = q.front();
      t = (temp.pos - del - 1) / m;
    }
  }
  cout << ans << endl;
  return 0;
}
