#include <bits/stdc++.h>
using namespace std;
long long int bg = 998244353;
long long int gcd(long long int a, long long int b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
long long int power(long long int x, long long int y, long long int p) {
  if (x == 0) return 0;
  if (y == 0) return 1;
  long long int s = y / 2;
  long long int f = power(x, s, p) % p;
  if (y % 2 == 0)
    return (f * f) % p;
  else
    return (((f * f) % p) * x % p) % p;
}
void build1(long long int node, long long int seg[], long long int arr[],
            long long int start, long long int end) {
  if (start == end) {
    seg[node] = arr[start];
    return;
  }
  long long int mid = (start + end) / 2;
  build1(2 * node, seg, arr, start, mid);
  build1(2 * node + 1, seg, arr, mid + 1, end);
  seg[node] = seg[2 * node] + seg[2 * node + 1];
}
long long int query1(long long int node, long long int seg[],
                     long long int arr[], long long int start,
                     long long int end, long long int l, long long int r) {
  long long int mid = (start + end) / 2;
  if (r < start || l > end)
    return 0;
  else if (l <= start && r >= end)
    return seg[node];
  else
    return query1(2 * node, seg, arr, start, mid, l, r) +
           query1(2 * node + 1, seg, arr, mid + 1, end, l, r);
}
long long int page(long long int f, long long int rem, long long int k) {
  long long int x, n = f - rem;
  if (n % k == 0)
    x = n / k;
  else
    x = n / k + 1;
  return x;
}
int main() {
  long long int i, j, n, m, k, pos = 0, rem = 0, mov = 0;
  cin >> n >> m >> k;
  long long int arr[m];
  for (i = 0; i < m; i++) cin >> arr[i];
  while (pos < m) {
    for (j = pos; (page(arr[pos], rem, k) == page(arr[j], rem, k) && j < m);
         j++) {
    }
    pos = j;
    rem = j;
    mov++;
  }
  cout << mov << '\n';
  return 0;
}
