#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 5;
long long n, m, k, ans, arr[N], cnt;
int main() {
  cin >> n >> m >> k;
  for (int i = 0; i < m; ++i) {
    cin >> arr[i];
  }
  for (int i = 0; i < m; ++i) {
    int st = i, en = m - 1;
    long long x1 = 1ll * (arr[i] - cnt) / k + ((arr[i] - cnt) % k != 0);
    while (st < en) {
      int mid = (st + en + 1) / 2;
      long long x2 = 1ll * (arr[mid] - cnt) / k + ((arr[mid] - cnt) % k != 0);
      if (x2 > x1)
        en = mid - 1;
      else
        st = mid;
    }
    cnt += st - i + 1;
    i = st;
    ++ans;
  }
  printf("%lld", ans);
  return 0;
}
