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