#include <bits/stdc++.h>
using namespace std;
const int MAX = 1e5 + 2, MOD = 1e9 + 7;
long long a[MAX];
int32_t main() {
  long long n, m, k;
  cin >> n >> m >> k;
  for (int i = 0; i < m; i++) cin >> a[i];
  long long f = 0, ans = 0;
  for (int i = 0; i < m;) {
    long long curPage = (a[i] - 1 - f) / k;
    int j = i;
    while ((a[i] - 1 - f) / k <= curPage and i < m) i++;
    f += i - j;
    ans++;
  }
  cout << ans;
  return 0;
}
