#include <bits/stdc++.h>
using namespace std;
void sep(string SS = "BLOCK") {
  cout << "-------------" << SS << "-----------------\n";
}
template <typename t>
void pr(t a) {
  cout << a << endl;
}
template <typename t>
void prs(t a) {
  cout << a << " ";
}
template <typename T>
void debugv(vector<T> arr) {
  for (auto t : arr) cout << t << " ";
  cout << "\n";
}
template <typename T>
void debugarr(T arr, int n) {
  for (int i = 0; i < n; i++) cout << arr[i] << " ";
  cout << "\n";
}
template <typename T>
void chmax(T& a, T b) {
  if (a < b) a = b;
}
template <typename T>
void chmin(T& a, T b) {
  if (a > b) a = b;
}
long long min(long long a, long long b) { return a < b ? a : b; }
long long max(long long a, long long b) { return a > b ? a : b; }
const int maxn = 4e6 + 100;
const long long INF = 1e18;
long long a[maxn], n, m, t, k, q;
unordered_map<long long, long long> u;
string s;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> m >> k;
  long long pk = k;
  vector<long long> p(m);
  for (long long i = 0; i < m; i++) cin >> p[i];
  long long res = 0;
  for (long long i = 0; i < m;) {
    ++res;
    long long j = i;
    while (j < m && p[j] <= k) {
      ++j;
    }
    if (j - i == 0) {
      --res;
      k += ((p[j] - k + pk - 1) / pk) * pk;
    } else
      k += j - i;
    i = j;
  }
  pr(res);
}
