#include <bits/stdc++.h>
using namespace std;
vector<long long> vec;
int main() {
  long long n, m, k, x, res = 0;
  scanf("%lld %lld %lld ", &n, &m, &k);
  for (long long i = 0; i < m; i++) scanf("%lld", &x), vec.push_back(x);
  vec.push_back(1000000000000000002ll);
  long long head = 1, lst = 0;
  int ind = -1;
  for (int i = 0; i < m; i++) {
    if (ind >= i) continue;
    int y = upper_bound(vec.begin(), vec.end(), lst) - vec.begin();
    if (y == vec.size()) y--;
    x = vec[y];
    if (head != x) {
      long long z = x - head + 1;
      if (!(z % k)) z--;
      z = z / k;
      z *= k;
      head += z;
    }
    int s = ind;
    if ((vec[m] - head + 1ll) <= k)
      ind = m;
    else
      ind = upper_bound(vec.begin(), vec.end(), head + k - 1) - vec.begin() - 1;
    lst = vec[ind];
    int kk = (ind - s);
    head += kk;
    res++;
  }
  printf("%lld\n", res);
  return 0;
}
