#include <bits/stdc++.h>
using namespace std;
long long MOD = 998244353;
int main() {
  long long n, m, k;
  cin >> n >> m >> k;
  long long a[m];
  for (int i = 1; i <= m; i++) cin >> a[i];
  long long cnt = 0;
  long long sum = 0;
  long long j = 1;
  while (j <= m) {
    long long x = ((a[j] - sum - 1) / k + 1) * k + sum;
    while (j <= m && a[j] <= x) {
      sum++;
      j++;
    }
    cnt++;
  }
  cout << cnt;
  return 0;
}
