#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, m, k;
  cin >> n >> m >> k;
  long long int a[m];
  for (int i = 0; i < m; i++) cin >> a[i];
  long long int s = 0, S = 0;
  for (int i = 0; i < m; i++) {
    long long int d;
    if ((a[i] - s) % k == 0)
      d = (a[i] - s) / k - 1;
    else
      d = (a[i] - s) / k;
    int z = i;
    long long int K = s;
    while (1) {
      long long int D;
      if ((a[z] - K) % k == 0)
        D = (a[z] - K) / k - 1;
      else
        D = (a[z] - K) / k;
      if (D != d) break;
      s++;
      z++;
      if (z == m) break;
    }
    S++;
    i = z - 1;
  }
  cout << S;
  return 0;
}
