#include <bits/stdc++.h>
using namespace std;
const int maxn = 3e5 + 5;
long long n, m, k, a[maxn];
int main() {
  cin >> n >> m >> k;
  for (long long i = 1; i <= m; i++) {
    scanf("%lld", &a[i]);
  }
  long long l = 1, r = k, index = 1, ans = 0;
  while (index <= m) {
    long long cnt = 0;
    while (a[index] >= l && a[index] <= r) index++, cnt++;
    if (cnt == k || cnt == 0) {
      long long x = (a[index] - r) / k;
      if (r + x * k < a[index]) x += 1;
      r += x * k;
      l = r - k;
    } else
      r += cnt;
    if (cnt != 0) ans++;
  }
  cout << ans << endl;
}
