#include <bits/stdc++.h>
using namespace std;
long long n, k;
int m, c, odp;
vector<long long> v;
void ini() {
  long long a;
  scanf("%lld%d%lld", &n, &m, &k);
  for (int i = 1; i <= m; i++) {
    scanf("%lld", &a);
    v.push_back(a);
  }
}
int main() {
  ini();
  for (int i = 1; i <= m; i++) {
    long long d = ((v[c] - c) / k) * k;
    if (d < v[c] - c) d += k;
    int y = c;
    while (c < m && (v[c] - y) <= d) c++;
    odp++;
    if (c == m) break;
  }
  printf("%d\n", odp);
}
