#include <bits/stdc++.h>
using namespace std;
long long int a[300005];
int main() {
  ios_base::sync_with_stdio(false);
  long long int n, m, k;
  cin >> n >> m >> k;
  for (int i = 0; i <= m - 1; i++) cin >> a[i], a[i]--;
  int ptr = 0;
  long long int ans = 0, rem = 0;
  while (1) {
    if (ptr >= m) break;
    ans++;
    long long int blck = (a[ptr] - rem) / k;
    long long int rem2 = 0;
    while (1) {
      if (ptr >= m) break;
      if ((a[ptr] - rem) / k != blck) break;
      rem2++;
      ptr++;
    }
    rem += rem2;
  }
  cout << ans;
  return 0;
}
