#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 10;
long long a[maxn];
long long n, k;
int m, ans;
int main() {
  scanf("%lld%d%lld", &n, &m, &k);
  for (int i = 1; i <= m; i++) scanf("%lld", &a[i]), a[i]--;
  long long offset = 0;
  for (int i = 1; i <= m; i++) {
    int l = i, r = i;
    while (r < m && (a[r + 1] - offset) / k == (a[r] - offset) / k) r++;
    ans++;
    offset = r;
    i = r;
  }
  printf("%d\n", ans);
}
