#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimization("unroll-loops")
using namespace std;
long long max(long long a, long long b) {
  if (a < b) return b;
  return a;
}
long long min(long long a, long long b) {
  if (a < b) return a;
  return b;
}
long long X[] = {-1, 1, 0, 0};
long long Y[] = {0, 0, -1, 1};
long long XX[] = {-1, 1, 0, 0, -1, 1, -1, 1};
long long YY[] = {0, 0, -1, 1, -1, 1, 1, -1};
long long HX[] = {1, -1, 2, -2, 1, -1, -2, 2};
long long HY[] = {2, -2, 1, -1, -2, 2, 1, -1};
long long fpow(long long x, long long n) {
  long long res = 1;
  while (n) {
    if (n & 1) {
      res = res * x % 1000000007;
    }
    x = x * x % 1000000007;
    n >>= 1;
  }
  return (res % 1000000007);
}
long long binomialCoeff(long long n, long long k) {
  long long C[n + 1][k + 1];
  long long i, j;
  C[0][0] = 1;
  for (i = 1; i <= n; i++) {
    for (j = 0; j <= min(i, k); j++) {
      if (j == 0 || j == i)
        C[i][j] = 1;
      else
        C[i][j] = (C[i - 1][j - 1] + C[i - 1][j]) % 1000000007;
    }
  }
  return C[n][k];
}
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long lcm(long long a, long long b) { return a * (b / gcd(a, b)); }
void solve() {
  long long n, m, k;
  cin >> n >> m >> k;
  long long removed = 0;
  long long arr[m], pg[m];
  for (int i = 0; i < m; i++) {
    cin >> arr[i];
    arr[i]--;
    pg[i] = (arr[i] / k);
  }
  long long ind = 0;
  long long step = 0;
  while (1) {
    long long x = (arr[ind] - removed) / k;
    long long add = 0;
    while (ind < m && x == (arr[ind] - removed) / k) {
      ind++;
      add++;
    }
    step++;
    removed += add;
    if (ind >= m) break;
  }
  cout << step;
}
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  solve();
}
