#include <bits/stdc++.h>
using namespace std;
void tokitsukadze() {
  int hp;
  cin >> hp;
  const char* ans[] = {"1 A", "0 A", "1 B", "2 A"};
  cout << ans[hp % 4] << endl;
}
void majong() {
  string cards[3];
  int i;
  for (i = 0; i < 3; ++i) cin >> cards[i];
  sort(cards, cards + 3);
  for (i = 1; i < 3; ++i) {
    if (cards[i] != cards[i - 1]) break;
  }
  if (i == 3) {
    cout << "0\n";
    return;
  }
  int equal_chars = 1;
  int delta[3];
  for (i = 1; i < 3; ++i) {
    if (cards[i][1] == cards[i - 1][1]) ++equal_chars;
    delta[i] = cards[i][0] - cards[i - 1][0];
  }
  if (equal_chars == 3 && delta[1] == 1 && delta[2] == 1) {
    cout << "0\n";
    return;
  }
  if (equal_chars >= 2) {
    for (i = 1; i < 3; ++i) {
      if (cards[i][1] == cards[i - 1][1] && delta[i] >= -2 && delta[i] <= 2) {
        cout << "1\n";
        return;
      }
    }
  }
  cout << "2\n";
}
void throwing() {
  long long int n, k;
  int m;
  cin >> n >> m >> k;
  vector<long long int> p(m);
  for (int i = 0; i < m; ++i) cin >> p[i];
  int operations = 0;
  int d = 0;
  for (int i = 0; i < m; ++i) {
    long long int page = (p[i] - 1 - d) / k;
    int page_d = 0;
    while (i < m && p[i] <= (page + 1) * k + d) {
      ++page_d;
      ++i;
    }
    --i;
    d += page_d;
    ++operations;
  }
  cout << operations << endl;
}
int main() {
  throwing();
  return 0;
}
