#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, m, k;
  cin >> n >> m >> k;
  long long int a[m];
  for (int i = 0; i < m; i++) {
    cin >> a[i];
  }
  sort(a, a + m);
  long long int index = 0, sum = 0, ans = 0;
  while (index < m) {
    long long int r = ((a[index] - sum - 1) / k + 1) * k + sum;
    while (index < m && a[index] <= r) {
      index++;
      sum++;
    }
    ans++;
  }
  cout << ans << endl;
  return 0;
}
