10 5 5
2 3 4 5 6
 1 1 1
1
 1000000000000000000 10 68
9818112234872670 233245257111863071 266483628625876079 375103213040049805 431982380866113633 489732004669478331 501030096787260719 541800997319766183 551892546260532408 696178619227890200
 1000000000000000000 2 1
1 1000000000000000000
 33 32 1
1 2 3 4 5 6 7 8 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
 101 55 10
1 3 5 7 8 9 10 16 18 21 22 23 24 25 27 30 32 35 36 37 38 39 40 43 45 47 49 50 51 52 54 57 59 61 64 66 67 68 69 70 71 72 73 80 83 86 87 88 89 90 91 92 96 97 98
 1000000000000000000 5 1000
1 1000000000 1000000000000 1000000000000000 1000000000000001
 15 15 15
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
 21 21 20
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
 45 43 2
1 2 3 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
 107 20 13
5 9 20 25 26 30 37 45 51 58 62 73 82 87 89 90 99 101 104 106
 3 2 1
1 2
 1000000000 2 1000000000
1 1000000000
 11 7 3
2 3 4 5 6 7 11
 13 9 4
1 2 3 6 7 8 11 12 13
 1000000000000000000 2 1000000000
102306300054748096 267367244641009859
 16 7 5
2 3 4 5 6 15 16
 35 35 1
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
 1000000000000000000 20 365
31881893160049984 103938857870698567 103962228223609431 140762820261865064 175962215264653912 239086305245565642 354522451098745823 383839975876242372 443471287955807705 478923027151493682 511195154588214957 619570919279066139 677571312513476877 705864797651447277 789633853044745934 867300890280086078 883297431113041450 891736036124527038 937306858250803630 990892290394455512

2
 1
 10
 2
 32
 15
 4
 1
 2
 35
 9
 2
 1
 4
 4
 2
 4
 35
 20

#include <bits/stdc++.h>
using namespace std;
long int binarySearch(vector<long int> arr, long int l, long int r,
                      long int x) {
  if (r > l) {
    long int mid = l + (r - l) / 2;
    if (arr[mid] == x)
      return mid;
    else if (arr[mid] > x)
      return binarySearch(arr, l, mid, x);
    else if (arr[mid] < x)
      return binarySearch(arr, mid + 1, r, x);
  }
  return -1;
}
void merge(vector<int> &arr, int l, int m, int r, vector<int> &index) {
  int i, j, k;
  int n1 = m - l + 1;
  int n2 = r - m;
  int L[n1], R[n2];
  int l1[n1], r1[n2];
  for (i = 0; i < n1; i++) {
    L[i] = arr[l + i];
    l1[i] = index[l + i];
  }
  for (j = 0; j < n2; j++) {
    R[j] = arr[m + 1 + j];
    r1[j] = index[m + 1 + j];
  }
  i = 0;
  j = 0;
  k = l;
  while (i < n1 && j < n2) {
    if (L[i] < R[j]) {
      arr[k] = L[i];
      index[k] = l1[i];
      i++;
    } else {
      arr[k] = R[j];
      index[k] = r1[j];
      j++;
    }
    k++;
  }
  while (i < n1) {
    arr[k] = L[i];
    index[k] = l1[i];
    i++;
    k++;
  }
  while (j < n2) {
    arr[k] = R[j];
    index[k] = r1[j];
    j++;
    k++;
  }
}
void mergeSort(vector<int> &arr, int l, int r, vector<int> &index) {
  if (l < r) {
    int m = l + (r - l) / 2;
    mergeSort(arr, l, m, index);
    mergeSort(arr, m + 1, r, index);
    merge(arr, l, m, r, index);
  }
}
double min1(double a, double b) {
  if (a < b) return a;
  return b;
}
long int max(long int a, long int b) {
  if (a > b) return a;
  return b;
}
int gcd(int a, int b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
void binary(long long int n, string &s) {
  while (n) {
    long long int temp = n % 2;
    s = to_string(temp) + s;
    n = n / 2;
  }
  return;
}
bool check(vector<vector<int>> dp, vector<vector<char>> num, int i, int j,
           int n, int m) {
  if (i < 0 || i > n - 1) return false;
  if (j < 0 || j > m - 1) return false;
  if ((i == n - 1) && (j == m - 1) && (num[i][j] != '#')) return true;
  if (dp[i][j] == 1) {
    return false;
  }
  dp[i][j] = 1;
  if (num[i][j] == '#') return false;
  if (check(dp, num, i + 1, j, n, m) || check(dp, num, i, j + 1, n, m) ||
      check(dp, num, i, j - 1, n, m) || check(dp, num, i - 1, j, n, m))
    return true;
  return false;
}
const int MAX = 1e5 + 10;
long long p[MAX];
int main() {
  long long n, m, k;
  scanf("%lld%lld%lld", &n, &m, &k);
  for (int i = 1; i <= m; i++) scanf("%lld", &p[i]);
  int ans = 0;
  int sum = 0;
  int now = 1;
  while (now <= m) {
    long long r = ((p[now] - sum - 1) / k + 1) * k + sum;
    cout << "r:" << r << endl;
    while (now <= m && p[now] <= r) {
      sum++;
      now++;
    }
    ans++;
  }
  printf("%d\n", ans);
  return 0;
}
