#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, m, k;
  cin >> n >> m >> k;
  long long int ans = 0, count = 0, pages = 1, a[m];
  for (int i = 0; i < m; i++) {
    cin >> a[i];
  }
  int i = 0;
  while (i < m) {
    long long int temp;
    int found = 0;
    if ((a[i] - count) % k == 0)
      pages = (a[i] - count) / k;
    else
      pages = (a[i] - count) / k + 1;
    temp = pages * k + count;
    while (i < m && a[i] <= temp) {
      i++;
      count++;
      found = 1;
    }
    if (found == 1) ans++;
  }
  cout << ans << "\n";
  return 0;
}
