#include <bits/stdc++.h>
using namespace std;
long long dx[8] = {-1, -1, -1, 0, 0, 1, 1, 1};
long long dy[8] = {-1, 0, 1, -1, 1, -1, 0, 1};
long long tc, n, k, m, a[100001];
string s;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m >> k;
  for (int i = 0; i < m; ++i) {
    cin >> a[i];
  }
  long long cur = 0;
  long long steps = 0;
  long long rem = 0, tmp = 0;
  while (cur < m) {
    steps++;
    rem = cur;
    tmp = (a[cur] - rem + k - 1) / k;
    while (cur < m && (a[cur] - rem + k - 1) / k == tmp) cur++;
  }
  cout << steps;
}
