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;
using lint = long long;
using ii = pair<int, int>;
using ll = pair<lint, lint>;
using ti = tuple<int, int, int>;
using il = pair<int, lint>;
namespace T {
const int MAX = 1e5 + 5;
const int INF = 1e9 + 7;
const int N = 1e6 + 5;
int max_t[4 * MAX];
int min_t[4 * MAX];
void init() {
  for (int i = 0; i < 4 * MAX; i++) {
    max_t[i] = min_t[i] = 0;
  }
}
void max_up(int n, int s, int e, int p, int v) {
  if (p < s || p > e) return;
  if (s == e)
    max_t[n] = v;
  else {
    max_up(2 * n, s, (s + e) / 2, p, v);
    max_up(2 * n + 1, (s + e) / 2 + 1, e, p, v);
    max_t[n] = max(max_t[2 * n], max_t[2 * n + 1]);
  }
}
void min_up(int n, int s, int e, int p, int v) {
  if (p < s || p > e) return;
  if (s == e)
    min_t[n] = v;
  else {
    min_up(2 * n, s, (s + e) / 2, p, v);
    min_up(2 * n + 1, (s + e) / 2 + 1, e, p, v);
    min_t[n] = min(min_t[2 * n], min_t[2 * n + 1]);
  }
}
int max_v(int n, int s, int e, int l, int r) {
  if (r < s || l > e) return 0;
  if (l <= s && e <= r) return max_t[n];
  int m = (s + e) / 2;
  return max(max_v(2 * n, s, m, l, r), max_v(2 * n + 1, m + 1, e, l, r));
}
int min_v(int n, int s, int e, int l, int r) {
  if (r < s || l > e) return INF;
  if (l <= s && e <= r) return min_t[n];
  int m = (s + e) / 2;
  return min(min_v(2 * n, s, m, l, r), min_v(2 * n + 1, m + 1, e, l, r));
}
class fenwick {
 public:
  lint tree[N] = {
      0,
  };
  void update(int p, lint v) {
    while (p < N) {
      tree[p] += v;
      p += p & -p;
    }
  }
  lint sum(int p) {
    if (p == 0) {
      return 0LL;
    }
    lint ret = 0;
    while (p) {
      ret += tree[p];
      p -= p & -p;
    }
    return ret;
  }
  lint sum(int x, int y) { return sum(y) - sum(x - 1); }
};
}  // namespace T
namespace P {
const int N = 2 * 1e6 + 5;
using lint = long long;
bool v[N];
void make() {
  fill(v, v + N, true);
  for (int i = 2; i < N; i++) {
    if (v[i]) {
      for (lint j = (lint)i * i; j < N; j += i) {
        v[j] = false;
      }
    }
  }
}
}  // namespace P
namespace U {
int min3(int a, int b, int c) { return min(min(a, b), c); }
int min4(int a, int b, int c, int d) { return min(min(a, b), min(c, d)); }
int max3(int a, int b, int c) { return max(max(a, b), c); }
int max4(int a, int b, int c, int d) { return max(max(a, b), max(c, d)); }
bool get(char c) {
  return (c == 'a') || (c == 'e') || (c == 'i') || (c == 'o') || (c == 'u');
}
int gcd(int a, int b) {
  if (a < b) {
    swap(a, b);
  }
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
}  // namespace U
namespace C {
int get(const vector<int>& v, int key) {
  int l = 0;
  int r = (int)(v.size()) - 1;
  while (l <= r) {
    int m = (l + r) / 2;
    if (v[m] == key) {
      return m;
    } else if (v[m] < key) {
      l = m + 1;
    } else {
      r = m - 1;
    }
  }
}
vector<int> compress(const vector<int>& v) {
  vector<int> val = v;
  sort(val.begin(), val.end());
  val.erase(unique(val.begin(), val.end()), val.end());
  vector<int> re = v;
  for (int& x : re) {
    x = get(val, x) + 1;
  }
  return re;
}
}  // namespace C
const int N = 1e5 + 5;
lint n, m, k;
lint a[N];
void input() {
  scanf("%lld%lld%lld", &n, &m, &k);
  for (lint i = 0; i < m; i++) {
    scanf("%lld", a + i);
    --a[i];
  }
}
void go() {
  lint cnt = 0;
  lint j = 0;
  while (j != m) {
    lint t = j;
    while (t != m) {
      lint a1 = (a[j] - j) / k;
      lint a2 = (a[t] - j) / k;
      if (a1 == a2) {
        ++t;
      } else {
        break;
      }
    }
    j = t;
    ++cnt;
  }
  printf("%lld\n", cnt);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  input();
  go();
}
