#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, m, k, input;
  vector<long long int> list;
  cin >> n >> m >> k;
  for (long long int i = 0; i < m; i++) {
    cin >> input;
    list.push_back(input);
  }
  long long int op = 0, no_del = 0, new_del = 0, page = (list[0] - 1) / k,
                new_page = 0;
  for (long long int i = 0; i < m; i++) {
    new_page = (list[i] - 1 - no_del) / k;
    if (new_page == page)
      new_del++;
    else {
      no_del = no_del + new_del;
      new_del = 0;
      op++;
      page = (list[i] - 1 - no_del) / k;
      i--;
    }
  }
  op++;
  cout << op;
  return 0;
}
