#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
int i, j;
long long a[300005];
int main() {
  long long n, k, s = 0;
  int m;
  cin >> n >> m >> k;
  for (i = 1; i <= m; i++) {
    cin >> a[i];
    a[i]--;
  }
  int ans = 0;
  for (i = 1; i <= m; i++) {
    int l = i;
    while ((a[l] - s) / k == (a[i] - s) / k) {
      l++;
    }
    s += l - i;
    i = l - 1;
    ans++;
  }
  cout << ans << '\n';
}
