#include <bits/stdc++.h>
#pragma GCC omptimize("unroll-loops")
#pragma optimize("SEX_ON_THE_BEACH")
#pragma GCC optimize("no-stack-protector")
#pragma comment(linker, "/STACK:1000000000")
using namespace std;
using ll = unsigned long long int;
using ull = unsigned long long int;
using dd = long double;
using ldd = long double;
using si = short int;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
ll get_seed(string s) {
  ll ans = 0;
  for (int i = 0; i < s.size(); ++i) ans += s[i];
  return ans;
}
int popcount(int x) { return __builtin_popcount(x); }
ll popcountll(ll x) { return __builtin_popcount(x); }
void solve(int ii) {
  ll n, m, k;
  cin >> n >> m >> k;
  vector<ll> arr(m);
  for (int i = 0; i < m; ++i) {
    cin >> arr[i];
    --arr[i];
  }
  ll mi = 0;
  ll ans = 0;
  int l = 0;
  while (l < m) {
    int r = l + 1;
    while (r < m && (arr[r] - mi) / k == (arr[l] - mi) / k) ++r;
    ++ans;
    mi += r - l;
    l = r;
  }
  cout << ans;
}
int main() {
  ios_base::sync_with_stdio(0);
  cout.tie(0);
  cin.tie(0);
  int t;
  t = 1;
  for (int i = 0; i < t; ++i) solve(i);
  return 0;
}
