#include <bits/stdc++.h>
using namespace std;
const double pi = 3.14159265358979323846;
void cp() {}
void solve() {
  long long n, m, k;
  cin >> n >> m >> k;
  long long a[m];
  for (int i = 0; i < m; i++) cin >> a[i];
  long long now = 0, sum = 0, ans = 0;
  while (now < m) {
    long long till = ((a[now] - sum - 1) / k + 1) * k + sum;
    while (now < m and till >= a[now]) {
      sum++;
      now++;
    }
    ans++;
  }
  cout << ans;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  long long t = 1;
  while (t--) solve();
  return 0;
}
