#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 100;
long long p[N];
int main() {
  long long n, m, k;
  cin >> n >> m >> k;
  for (int i = 1; i <= m; ++i) cin >> p[i];
  long long qian = 0, ans = 0, pos = 0, cnt = 0;
  int flag = 0;
  for (int i = 1; i <= m; i++) {
    if (!flag) {
      ans += 1, qian += cnt, cnt = 0;
      pos = (p[i] - 1 - qian) / k + 1, flag = 1;
    }
    long long t = (p[i] - 1 - qian) / k + 1;
    if (t == pos)
      cnt++;
    else {
      i--;
      flag = 0;
    }
  }
  cout << ans << endl;
}
