#include <bits/stdc++.h>
using namespace std;
long long n, m, k;
long long p[100007];
int main() {
  cin >> n >> m >> k;
  for (int i = 1; i <= m; i++) {
    cin >> p[i];
  }
  for (int i = m; i >= 1; i--) {
    p[i] -= p[i - 1];
  }
  long long cnt = 0, sum = 0, ans = 0;
  for (int i = 1; i <= m; i++) {
    sum = (sum + p[i] - 1) % k + 1;
    cnt++;
    if (i == m || p[i + 1] + sum > k) {
      ans++;
      sum += k - cnt;
      cnt = 0;
    }
  }
  cout << ans << endl;
}
