#include <bits/stdc++.h>   using namespace std;   using ll = long long;   int main() {     ios::sync_with_stdio(false);     cin.tie(0);     ll n, m, k;     cin >> n >> m >> k;     vector<ll> vec(m);     for (ll &v : vec) cin >> v;     ll ans = 0, i = 0;     while (i < m) {       ll t = (vec[i] - i - 1) / k, j = i + 1;       while (j < m && (vec[j] - i - 1) / k == t) j++;       ans++, i = j;     }     cout << ans;     return 0;   }   