#include <bits/stdc++.h>
using namespace std;
long long n, k, ans, del, start, dell;
int m;
long long a[100005];
int main() {
  scanf("%lld %d %lld", &n, &m, &k);
  for (int i = 1; i <= m; ++i) scanf("%lld", &a[i]);
  for (int i = 1; i <= m; ++i) {
    start = ((a[i] - del) - ((a[i] - del) % k ? ((a[i] - del) % k) : k));
    dell = del;
    while (start <= (a[i] - dell) && (a[i] - dell) <= start + k) ++i, ++del;
    --i, ++ans;
  }
  cout << ans << '\n';
  return 0;
}
