#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, m, k;
  cin >> n >> m >> k;
  vector<long long int> vec(m);
  for (int i = 0; i < m; i++) {
    cin >> vec[i];
  }
  long long int moves = 0;
  long long int i = 0;
  long long int sum = 0;
  while (i < m) {
    long long rightBorder = ((vec[i] - sum - 1) / k + 1) * k + sum;
    while (vec[i] <= rightBorder && i < m) {
      i++;
      sum++;
    }
    moves++;
  }
  cout << moves << '\n';
  return 0;
}
