#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int n, m, k, count = 0, cnt = 0, i = 0;
  cin >> n >> m >> k;
  long long int arr[m];
  for (int i = 0; i < m; i++) cin >> arr[i];
  long long int p = 1;
  while (count != m) {
    int x = 0;
    for (; i < m; i++) {
      if (arr[i] <= (p * k + count))
        x++;
      else
        break;
    }
    if (x != 0) {
      count += x;
      cnt++;
    } else {
      p = (arr[i] - count);
      p /= k;
      if (arr[i] > (p * k + count)) p++;
    }
  }
  cout << cnt;
  return 0;
}
