#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int n, m, k;
  cin >> n >> m >> k;
  long long int arr[m];
  for (int i = 0; i < m; i++) {
    cin >> arr[i];
    arr[i]--;
  }
  sort(arr, arr + m);
  long long int c = 0, p = 0, q = k - 1, op = 0, cnt = 0;
  long long int i = 0;
  p = (arr[0] / k) * k;
  q = p + k - 1;
  int f = 1;
  while (i < m) {
    while (i < m && (arr[i] - cnt) >= (p) && (arr[i] - cnt) <= (q)) {
      c++;
      i++;
      continue;
    }
    if (i >= m) break;
    if (c) {
      op++;
      cnt += c;
      c = 0;
    } else {
      p = ((arr[i] - cnt) / k) * k;
      q = p + k - 1;
      c = 0;
    }
  }
  cout << op + 1 << '\n';
}
