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;
const int64_t X = 1e9 + 7;
const int64_t inf = 1e18;
void google(int64_t i) { cout << "Case #" << i << ": "; }
void prec(double n, int64_t d) {
  cout << fixed << setprecision(d) << n << "\n";
}
int64_t prime[1000001];
void sieve(int64_t n) {
  for (int64_t i = 0; (0 <= n + 1) ? (i < n + 1) : (i >= n + 1);
       (0 <= n + 1) ? (i++) : (i--))
    prime[i] = 1;
  for (int64_t i = 2; i * i <= n; i++) {
    if (prime[i] != 1) continue;
    for (int64_t j = i * i; j <= n; j = j + i)
      if (prime[j] == 1) prime[j] = i;
  }
}
int64_t gcd(int64_t a, int64_t b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
int64_t bin(int64_t a, int64_t n, int64_t m) {
  int64_t res = 1;
  while (n) {
    if (n % 2) {
      res = (res * a) % m;
      n--;
    }
    a = (a * a) % m;
    n /= 2;
  }
  return res;
}
void dijktra(vector<pair<int64_t, int64_t>> g[], int64_t n) {
  priority_queue<pair<int64_t, int64_t>, vector<pair<int64_t, int64_t>>,
                 greater<pair<int64_t, int64_t>>>
      pq;
  vector<int64_t> dist(n, inf);
  dist[0] = 0;
  int64_t parent[n];
  memset(parent, -1, sizeof(parent));
  pq.push({0, 0});
  while (!pq.empty()) {
    pair<int64_t, int64_t> x = pq.top();
    pq.pop();
    for (int64_t i = 0; (0 <= (int64_t)g[x.second].size())
                            ? (i < (int64_t)g[x.second].size())
                            : (i >= (int64_t)g[x.second].size());
         (0 <= (int64_t)g[x.second].size()) ? (i++) : (i--)) {
      pair<int64_t, int64_t> k = g[x.second][i];
      if (dist[x.second] + k.first < dist[k.second]) {
        dist[k.second] = dist[x.second] + k.first;
        parent[k.second] = x.second;
        pq.push({dist[k.second], k.second});
      }
    }
  }
}
void bfs(int64_t s, vector<int64_t> g[], int64_t n) {
  bool vis[n];
  for (int64_t i = 0; (0 <= n) ? (i < n) : (i >= n); (0 <= n) ? (i++) : (i--))
    vis[i] = false;
  vis[s] = true;
  deque<int64_t> q;
  q.push_back(s);
  while (!q.empty()) {
    s = q.front();
    q.pop_front();
    for (int64_t i = 0; i < (int64_t)g[s].size(); i++) {
      if (!vis[g[s][i]]) {
        vis[g[s][i]] = true;
        q.push_back(g[s][i]);
      }
    }
  }
}
void dfs(int64_t u, vector<int64_t> g[], bool *vis) {
  vis[u] = true;
  for (int64_t i = 0; i < (int64_t)g[u].size(); i++)
    if (!vis[g[u][i]]) dfs(g[u][i], g, vis);
}
void create_w(vector<pair<int64_t, int64_t>> *g, int64_t m) {
  for (int64_t i = 0; (0 <= m) ? (i < m) : (i >= m); (0 <= m) ? (i++) : (i--)) {
    int64_t u, vector, w;
    cin >> u >> vector >> w;
    g[u - 1].push_back({w, vector - 1});
    g[vector - 1].push_back({w, u - 1});
  }
}
void create(vector<int64_t> *g, int64_t m) {
  for (int64_t i = 0; (0 <= m) ? (i < m) : (i >= m); (0 <= m) ? (i++) : (i--)) {
    int64_t u, vector;
    cin >> u >> vector;
    g[u - 1].push_back(vector - 1);
    g[vector - 1].push_back(u - 1);
  }
}
void contest(int64_t t) {
  int64_t n, m, k;
  cin >> n >> m >> k;
  int64_t s = 1;
  int64_t e = k;
  int64_t ans = 1;
  int64_t cnt = 0;
  for (int64_t i = 0; (0 <= m) ? (i < m) : (i >= m); (0 <= m) ? (i++) : (i--)) {
    int64_t x;
    cin >> x;
    if (x >= s && x <= e) {
      cnt++;
      continue;
    } else {
      if (cnt != 0) ans++;
      e += cnt;
      cnt = 0;
      if (x <= e) {
        cnt++;
        continue;
      } else {
        cnt++;
        s = e + k * ((x - e) / k);
        if (s == e) {
          s++;
          e = s + k - 1;
        } else if (s == x) {
          e = s;
          s = e - k + 1;
        } else
          e = min(n, s + k - 1);
      }
    }
  }
  cout << ans << "\n";
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int64_t T = 1;
  for (int64_t t = 0; (0 <= T) ? (t < T) : (t >= T); (0 <= T) ? (t++) : (t--)) {
    contest(t);
  }
  return 0;
}
