#include <bits/stdc++.h>
using namespace std;
template <typename T>
std::ostream &operator<<(std::ostream &out, vector<T> &v) {
  for (typename vector<T>::size_type i = 0; i < v.size(); ++i)
    out << v[i] << " ";
  out << "\n";
  return out;
}
template <typename T>
std::ostream &operator<<(std::ostream &out, vector<pair<T, T> > &v) {
  for (size_t i = 0; i < v.size(); ++i)
    out << "(" << v[i].first << ", " << v[i].second << ") ";
  out << "\n";
  return out;
}
template <typename T>
std::ostream &operator<<(std::ostream &out, vector<vector<T> > &v) {
  for (size_t i = 0; i < v.size(); ++i) {
    for (size_t j = 0; j < v[i].size(); ++j) {
      out << v[i][j] << " ";
    }
    out << "\n";
  }
  return out;
}
int main() {
  std::ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n, m, k;
  cin >> n >> m >> k;
  vector<long long> indices(m);
  for (int i = 0; i < m; ++i) {
    cin >> indices[i];
  }
  int operations = 1;
  int deleted = 0;
  int j = 0;
  for (int i = 1; i < m; ++i) {
    if ((indices[i] - deleted - 1) / k != (indices[j] - deleted - 1) / k) {
      ++operations;
      deleted += i - j;
      j = i;
    }
  }
  cout << operations << "\n";
  return 0;
}
