#include <bits/stdc++.h>
using namespace std;
template <class T>
istream &operator>>(istream &is, vector<T> &v) {
  for (auto &item : v) is >> item;
  return is;
}
template <class T1, class T2>
istream &operator>>(istream &is, pair<T1, T2> &p) {
  is >> p.first >> p.second;
  return is;
}
template <template <typename, typename...> class V, typename... Args>
typename std::enable_if<!std::is_same<std::string, V<Args...>>::value,
                        ostream &>::type
operator<<(ostream &os, const V<Args...> &cont) {
  for (const auto &item : cont) os << item << " ";
  os << endl;
  return os;
}
template <class T1, class T2>
ostream &operator<<(ostream &os, const pair<T1, T2> &p) {
  os << p.first << ';' << p.second;
  return os;
}
static int _ = [] {
  ios_base::sync_with_stdio(false);
  return 0;
}();
int main() {
  int64_t n, m, k;
  while (cin >> n >> m >> k) {
    vector<int64_t> p(m);
    cin >> p;
    int64_t ops = 1;
    int64_t page_end = k;
    int64_t shift = 0;
    for (int i = 0; i < m; i++) {
      if (p[i] > page_end) {
        if (shift > 0) {
          ops++;
          page_end += shift;
          shift = 0;
        }
        if (p[i] > page_end) page_end += k * (1 + (p[i] - page_end - 1) / k);
      }
      shift++;
    }
    cout << ops << endl;
    break;
    int ans;
    cin >> ans;
    if (ans != ops) cout << "! " << ans << endl;
    cout << "------------------------\n";
  }
  return 0;
}
