#include <bits/stdc++.h>
template <class C, class E>
inline bool contains(const C& container, const E& element) {
  return container.find(element) != container.end();
}
template <class T>
inline void checkmin(T& a, T b) {
  if (b < a) a = b;
}
template <class T>
inline void checkmax(T& a, T b) {
  if (b > a) a = b;
}
using namespace std;
long long n, m, k;
string s;
long long Page(long long a) { return (a - 1) / k; }
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cout << std::setprecision(15);
  cout << std::fixed;
  cin >> n >> m >> k;
  long long del = 0;
  vector<long long> d(m);
  for (int i = (0), _b = ((m)-1); i <= _b; i++) cin >> d[i];
  int next = 0;
  long long res = 0;
  while (next < m) {
    ++res;
    long long base = d[next] - del;
    long long page = Page(base);
    long long inc = 0;
    while (next < m && Page(d[next] - del) == page) {
      inc++;
      next++;
    }
    del += inc;
  }
  cout << res;
  return 0;
}
