#include <bits/stdc++.h>
using namespace std;
long long n, a[100005], k, m, t, ans;
long long block(long long first) { return (first - 1) / k; }
int32_t main() {
  ios_base ::sync_with_stdio(0);
  cin.tie();
  cout.tie();
  cin >> n >> m >> k;
  for (int i = 1; i <= m; i++) cin >> a[i];
  for (int i = 1; i <= m; i++) {
    int j = i;
    while (j < m && block(a[i] - t) == block(a[j + 1] - t)) j++;
    ans++;
    t += (j - i + 1);
    i = j;
  }
  cout << ans;
}
