#include <bits/stdc++.h>
using namespace std;
ofstream out("date.out");
deque<int64_t> st;
int64_t i, x, v[100005], n, m, k, nr_scoase, page, scoase_cur, step;
int main() {
  cin >> n >> m >> k;
  for (i = 1; i <= m; ++i) {
    cin >> v[i];
    st.push_back(v[i]);
  }
  for (; !st.empty();) {
    page = (st.front() - nr_scoase - 1) / k;
    scoase_cur = 1;
    st.pop_front();
    while (!st.empty() && (st.front() - nr_scoase - 1) / k == page) {
      scoase_cur++;
      st.pop_front();
    }
    nr_scoase += scoase_cur;
    step++;
  }
  cout << step;
}
