#include <bits/stdc++.h>
using namespace std;
int main() {
  long long i, j;
  long long n, m, k;
  long long p[110000];
  long long del_num = 0;
  long long ans = 0;
  long long page = 0;
  cin >> n >> m >> k;
  for (i = 0; i < m; i++) cin >> p[i];
  while (del_num < m) {
    page = (p[del_num] - del_num - 1) / k;
    int L = del_num, R = m - 1;
    while (1) {
      if (L == R) break;
      int M = (L + R) / 2;
      if (p[M] - del_num > (page + 1) * k)
        R = M;
      else if (p[M + 1] - del_num > (page + 1) * k) {
        L = M;
        break;
      } else
        L = M + 1;
    }
    del_num = L + 1;
    ans++;
  }
  cout << ans << endl;
  return 0;
}
