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>
#pragma GCC optimize("Ofast,unroll-loops,no-stack-protector,fast-math")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma comment(linker, "/STACK:256000000")
const int32_t base = 1000 * 1000 * 1000;
const double pi = 3.1415926535897932384626433832795;
std::vector<int32_t> transformation_string_to_vector(std::string s) {
  std::vector<int32_t> a;
  for (int32_t i = (int32_t)s.length(); i > 0; i -= 9)
    if (i < 9) {
      a.push_back(atoi(s.substr(0, i).c_str()));
    } else {
      a.push_back(atoi(s.substr(i - 9, 9).c_str()));
    }
  return a;
}
std::vector<int32_t> amount_bignumbers(std::vector<int32_t> &a1,
                                       std::vector<int32_t> &b) {
  std::vector<int32_t> a(a1);
  int32_t carry = 0;
  for (size_t i = 0; i < std::max(a.size(), b.size()) || carry; ++i) {
    if (i == a.size()) {
      a.push_back(0);
    }
    a[i] += carry + (i < b.size() ? b[i] : 0);
    carry = a[i] >= base;
    if (carry) {
      a[i] -= base;
    }
  }
  return a;
}
void print_bignumber(std::vector<int32_t> a) {
  printf("%d", a.empty() ? 0 : a.back());
  for (int32_t i = (int32_t)a.size() - 2; i >= 0; --i) printf("%09d", a[i]);
}
std::vector<int32_t> difference_bignumbers(std::vector<int32_t> &a1,
                                           std::vector<int32_t> &b) {
  std::vector<int32_t> a(a1);
  int32_t carry = 0;
  for (size_t i = 0; i < b.size() || carry; ++i) {
    a[i] -= carry + (i < b.size() ? b[i] : 0);
    carry = a[i] < 0;
    if (carry) {
      a[i] += base;
    }
  }
  while (a.size() > 1 && a.back() == 0) a.pop_back();
  return a;
}
std::vector<int32_t> multiplication_bignumbers(std::vector<int32_t> &a,
                                               std::vector<int32_t> &b) {
  std::vector<int32_t> c(a.size() + b.size());
  for (size_t i = 0; i < a.size(); ++i)
    for (int32_t j = 0, carry = 0; j < (int32_t)b.size() || carry; ++j) {
      int_fast64_t cur =
          c[i + j] + a[i] * 1ll * (j < (int32_t)b.size() ? b[j] : 0) + carry;
      c[i + j] = int32_t(cur % base);
      carry = int32_t(cur / base);
    }
  while (c.size() > 1 && c.back() == 0) c.pop_back();
  return c;
}
std::vector<int32_t> division_bignumbers(std::vector<int32_t> &a1, int32_t b) {
  std::vector<int32_t> a(a1);
  int32_t carry = 0;
  for (int32_t i = (int32_t)a.size() - 1; i >= 0; --i) {
    long long cur = a[i] + carry * 1ll * base;
    a[i] = int32_t(cur / b);
    carry = int32_t(cur % b);
  }
  while (a.size() > 1 && a.back() == 0) a.pop_back();
  return a;
}
void read_Graph(int32_t m, std::vector<std::vector<int32_t> > &g) {
  int32_t u, v;
  for (int32_t i = 0; i < m; i++) {
    std::cin >> u >> v;
    --u;
    --v;
    g[u].push_back(v);
    g[v].push_back(u);
  }
}
void dfs(int32_t v, int32_t dfs_timer, std::vector<int32_t> &time_in,
         std::vector<int32_t> &time_out, std::vector<int32_t> &color,
         std::vector<std::vector<int32_t> > &g) {
  time_in[v] = dfs_timer++;
  color[v] = 1;
  for (std::vector<int32_t>::iterator i = g[v].begin(); i != g[v].end(); ++i) {
    if (!color[*i]) {
      dfs(*i, dfs_timer, time_in, time_out, color, g);
    }
  }
  color[v] = 2;
  time_out[v] = dfs_timer++;
}
void bfs(int32_t start, std::vector<std::vector<int32_t> > &g) {
  std::queue<int32_t> q;
  q.push(start);
  std::vector<bool> used(100100);
  std::vector<int32_t> dist(100100), ancestor(100100);
  used[start] = true;
  ancestor[start] = -1;
  while (!q.empty()) {
    int32_t v = q.front();
    q.pop();
    for (std::vector<int32_t>::iterator i = g[v].begin(); i != g[v].end();
         ++i) {
      int32_t to = g[v][*i];
      if (!used[to]) {
        used[to] = true;
        q.push(to);
        dist[to] = dist[v] + 1;
        ancestor[to] = v;
      }
    }
  }
}
int32_t was = 0;
int_fast64_t check(int_fast64_t num, int_fast64_t k) {
  return ((num - was) / k) + (((num - was) % k) ? 1 : 0);
}
int32_t main() {
  using std::cin;
  using std::cout;
  using std::max;
  using std::min;
  std::ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int_fast64_t n, m, k;
  cin >> n >> m >> k;
  std::vector<int32_t> a(m);
  std::vector<bool> f(m);
  for (int32_t i = 0; i < m; i++) {
    cin >> a[i];
  }
  int32_t ans = 0;
  for (int32_t i = 0; i < m; i++) {
    if (f[i]) continue;
    f[i] = 1;
    int_fast64_t here = check(a[i], k);
    int_fast64_t kol = 1;
    for (int32_t j = i + 1; j < m; j++) {
      if (check(a[j], k) == here) {
        f[j] = 1;
        ++kol;
      } else {
        break;
      }
    }
    was += kol;
    ++ans;
  }
  cout << ans;
  return 0;
}
