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;
inline namespace Infinity {
inline namespace Constant {
constexpr const int eof = EOF;
constexpr const int maxint = INT_MAX;
constexpr const long long maxll = LLONG_MAX;
constexpr const double eps = 2.2204460492503131e-16;
}  // namespace Constant
inline namespace TypeDefine {
using uint = unsigned int;
using ll = long long int;
using llong = long long int;
using ull = unsigned long long int;
using ullong = unsigned long long int;
using ld = long double;
template <typename T>
using ConstRef = const T &;
template <typename T = vector<int>>
using Iter = typename T::iterator;
}  // namespace TypeDefine
inline namespace Miscelleneous {
inline constexpr int ctoi(const char c) { return c - '0'; }
inline constexpr char itoc(const int n) { return n + '0'; }
inline int dtoi(const double d) { return round(d); }
template <typename T, typename P>
inline T ceil(T a, P b) {
  return ::ceil(double(a) / b);
}
template <typename T, typename P>
inline T floor(T a, P b) {
  return ::floor(double(a) / b);
}
template <typename T>
inline constexpr bool in(T x, T l, T r) {
  return l <= x && x <= r;
}
template <typename T>
inline constexpr T tristate(int val, T nag, T zero, T pos) {
  return val > 0 ? pos : val < 0 ? nag : zero;
}
template <class T>
inline int size(const T &a) {
  return a.size();
}
template <class T>
inline void sort(T &a) {
  sort(a.begin(), a.end());
}
template <class T1, class T2>
inline void sort(T1 &a, T2 comp) {
  sort(a.begin(), a.end(), comp);
}
template <class T1, typename T2>
inline int lbound(const T1 &a, const T2 k) {
  return lower_bound(a.begin(), a.end(), k) - a.begin();
}
template <class T1, typename T2>
inline int ubound(const T1 &a, const T2 k) {
  return upper_bound(a.begin(), a.end(), k) - a.begin();
}
template <class T1, class T2>
inline int count(T1 &a, T2 k) {
  return ubound(a, k) - lbound(a, k);
}
template <class T>
inline void unique_erase(T &a) {
  a.erase(unique(a.begin(), a.end()), a.end());
}
template <typename T>
inline void clear(T &a) {
  memset(a, 0, sizeof a);
}
template <typename T>
T gcd(T a, T b) {
  while (b) {
    T t = a % b;
    a = b;
    b = t;
  }
  return a;
}
template <typename T>
T lcm(T a, T b) {
  return a / gcd(a, b) * b;
}
long long qpow(long long a, long long b, long long c) {
  return b ? qpow(a * a % c, b >> 1, c) * (b & 1 ? a : 1) % c : 1;
}
template <typename T>
T exGcd(T a, T b, T &x, T &y) {
  T d = a;
  if (b) {
    d = exGcd(b, a % b, y, x);
    y -= a / b * x;
  } else {
    x = 1;
    y = 0;
  }
  return d;
}
template <typename T>
inline constexpr T mps(T l, T r, T k) {
  return ((r - (r % k + k) % k) - (l + (k - l % k) % k)) / k + 1;
}
template <typename T>
inline constexpr T sgn(T a) {
  return a ? a > 0 ? 1 : -1 : 0;
}
template <typename T>
inline constexpr T sq(T a) {
  return a * a;
}
template <typename T>
inline constexpr bool odd(T a) {
  return bool(a % 2);
}
template <typename T>
inline constexpr bool even(T a) {
  return !bool(a % 2);
}
template <typename T1, typename T2>
inline constexpr T1 smod(T1 x, T2 m) {
  return x > m ? x - m : x + m < m ? x + m : x;
}
vector<int> repetend(vector<int> a) {
  vector<int> p(a.size(), -1);
  for (unsigned i = 0; i < a.size(); i++)
    if (p[i] == -1) {
      int c = 1;
      for (unsigned j = a[i]; j != i; j = a[j]) ++c;
      p[i] = c;
      for (unsigned j = a[i]; j != i; j = a[j]) p[j] = c;
    }
  return p;
}
template <typename T>
inline constexpr T lmiddle(T first, T last) {
  return first + (last - first) / 2;
}
template <typename T>
inline constexpr T rmiddle(T first, T last) {
  return last - (last - first) / 2;
}
template <typename T, typename F>
T dichotomy(T l, T r, F check, T prec = 1) {
  while (r - l > prec) {
    T m = lmiddle(l, r);
    (check(m) ? l : r) = m;
  }
  return l;
}
template <typename T, typename F>
T dichotomy2(T l, T r, F check, T prec = 1) {
  while (r - l > prec) {
    T m = rmiddle(l, r);
    (check(m) ? r : l) = m;
  }
  return r;
}
template <typename T>
bool equals(initializer_list<T> list) {
  for (T item : list) {
    if (item != *list.begin()) {
      return false;
    }
  }
  return true;
}
}  // namespace Miscelleneous
inline namespace BattleLab {
template <typename T>
vector<T> iota(T val = T()) {
  vector<T> a(val);
  iota(a.begin(), a.end(), T());
  return a;
}
template <typename T>
vector<int> argsort(const vector<T> &a) {
  vector<pair<T, int>> b;
  for (unsigned i = 0; i < a.size(); i++) {
    b.emplace_back(a[i], i);
  }
  stable_sort(b.begin(), b.end());
  vector<int> c;
  for (pair<T, int> p : b) {
    c.push_back(p.second);
  }
  return c;
}
template <typename T>
vector<T> rearrange(const vector<T> &a, const vector<int> &b) {
  vector<T> c(a.size());
  for (unsigned i = 0; i < b.size(); i++) {
    c[b[i]] = a[i];
  }
  return c;
}
class Pair : public pair<int, int> {
 public:
  using pair<int, int>::pair;
  Pair operator+(const Pair &p) {
    return {this->first + p.first, this->second + p.second};
  }
  Pair operator+=(const Pair &p) { return *this = *this + p; }
  bool operator<(const Pair &p) {
    return this->first != p.first ? this->first < p.first
                                  : this->second < p.second;
  }
};
struct {
  int i, n;
  bool first() const { return i == 0; }
  bool last() const { return i == n - 1; }
} loop;
template <typename T>
class Array : public std::vector<T> {
 public:
  using std::vector<T>::vector;
  Array() = default;
  Array(const vector<T> &a) : vector<T>(a) {}
  int length() const { return this->size(); }
  T min() const { return *min_element(this->begin(), this->end()); }
  T max() const { return *max_element(this->begin(), this->end()); }
  int indexOf(T elem) {
    auto it = find(this->begin(), this->end(), elem);
    return it == this->end() ? -1 : it - this->begin();
  }
  template <typename... types>
  Array<T> &append(types... args) {
    this->emplace_back(args...);
    return *this;
  }
  template <typename... types>
  Array<T> &prepend(types... args) {
    insert(this->begin(), args...);
    return *this;
  }
  T sum() const {
    T s = T();
    for (T val : *this) {
      s += val;
    }
    return s;
  }
  template <typename P>
  P sum(P val) const {
    for (T x : *this) {
      val += x;
    }
    return val;
  }
  Array<T> &add(T increment = 1) {
    for (T &val : *this) {
      val += increment;
    }
    return *this;
  }
  Array<T> &unique() {
    this->erase(std::unique(this->begin(), this->end()), this->end());
    return *this;
  }
  template <typename F>
  void foreach (F func) {
    loop.n = length();
    for (loop.i = 0; loop.i < loop.n; loop.i++) {
      func(this->at(loop.i));
    }
  }
  template <typename F>
  Array<pair<int, int>> segments(F func) {
    Array<pair<int, int>> a;
    int i = 0;
    while (i < length()) {
      int j = i + 1;
      while (j < length() && func(this->at(j - 1), this->at(j))) {
        j++;
      }
      a.emplace_back(i, j);
      i = j;
    }
    return a;
  }
  void iota() { std::iota(this->begin(), this->end(), T()); }
};
Array<int> getints(unsigned size) {
  Array<int> a(size);
  for (int &x : a) {
    scanf("%d", &x);
  }
  return a;
}
class ints : public Array<int> {
 public:
  using Array<int>::Array;
  void getint() {
    int x;
    scanf("%d", &x);
    append(x);
  }
};
using llongs = Array<long long>;
using doubles = Array<double>;
using PairList = Array<Pair>;
using int2d = Array<Array<int>>;
class String : public std::string {
 public:
  using std::string::string;
  String(const std::string &s = "") : std::string(s) {}
  String &prepend(char c) {
    this->insert(this->begin(), c);
    return *this;
  }
  int len() const { return length(); }
  String replace(const String &pattern, const String &replace) {
    String t;
    unsigned pos = 0;
    unsigned long long sub = 0;
    while ((sub = this->find(pattern, pos)) != string::npos) {
      t += this->substr(pos, sub - pos) + replace;
      pos = sub + pattern.length();
    }
    t += this->substr(pos);
    return t;
  }
  Array<String> split(char delimiter = ' ') const {
    Array<String> a(1);
    for (char c : *this) {
      if (c != delimiter) {
        a.back().push_back(c);
      } else {
        a.emplace_back();
      }
    }
    return a;
  }
  String repeat(int times) const {
    String s;
    while (--times) {
      s += *this;
    }
    return s;
  }
  String reversed() const {
    String s{*this};
    reverse(s.begin(), s.end());
    return s;
  }
  int toInt(int base = 10) const { return stoi(*this, 0, base); }
};
inline String getstr(unsigned size = 0x100000) {
  char s[++size];
  scanf("%s", s);
  return s;
}
inline String getln(unsigned size = 0x100000) {
  char s[++size];
  scanf("%[^\n]", s);
  getchar();
  return s;
}
inline void print(String s) { printf("%s", s.data()); }
class StringList : public Array<String> {
 public:
  using Array<String>::Array;
  String join(const String &delimiter) {
    String s = this->front();
    for (int i = 1; i < this->length(); i++) {
      s += delimiter + this->at(i);
    }
    return s;
  }
  operator vector<string>() {
    vector<string> vs;
    for (String s : *this) {
      vs.push_back(s);
    }
    return vs;
  }
};
inline StringList getstrs(int n, unsigned buffSize = 0x100000) {
  StringList sl;
  while (n--) {
    sl.append(getstr(buffSize));
  }
  return sl;
}
class Division {
 public:
  Division(int n, int k) : lb(n / k), ub(lb + 1), b(n % k) {}
  int operator[](int i) { return i < b ? ub : lb; }

 protected:
  int lb, ub, b;
};
struct AdjacencyList : public vector<vector<int>> {
  using vector<vector<int>>::vector;
  void addDirected(int u, int v) { (*this)[u].push_back(v); }
  void addUndirected(int u, int v) {
    addDirected(u, v);
    addDirected(v, u);
  }
};
class Range {
 protected:
  class RangeIterator {
   public:
    RangeIterator(int i = 0, int step = 1)
        : i(i), step(step), forward(step > 0) {}
    bool operator!=(const RangeIterator &it) const {
      return forward ? i < it.i : i > it.i;
    }
    int operator*() const { return i; }
    RangeIterator operator++() { return {i += step, step}; }

   protected:
    int i, step;
    bool forward;
  };

 public:
  Range(int to) : from(0), to(to), step(1) {}
  Range(int from, int to, int step = 1) : from(from), to(to), step(step) {}
  RangeIterator begin() const { return {from, step}; }
  RangeIterator end() const { return {to, step}; }

 protected:
  int from, to, step;
};
class ReversedRange : public Range {
 public:
  ReversedRange(int to) : Range(to - 1, -1, -1) {}
};
}  // namespace BattleLab
inline namespace IO {
const char LF = '\n';
const char SP = ' ';
int dbl_prec = 10;
int ldbl_prec = 18;
inline void print(const int n) { printf("%d", n); }
inline void print(const unsigned n) { printf("%u", n); }
inline void print(const long long n) { printf("%lld", n); }
inline void print(const unsigned long long n) { printf("%lld", n); }
inline void print(const double a) { printf("%.*f", dbl_prec, a); }
inline void print(const long double a) { printf("%.*Lf", ldbl_prec, a); }
inline void print(const char c) { printf("%c", c); }
inline void print(const char s[]) { printf("%s", s); }
inline void print(const string &s) { printf("%s", s.data()); }
template <typename T>
inline void printsp(const T a) {
  print(a);
  print(SP);
}
template <typename T, typename U>
inline void print(const pair<T, U> &p) {
  printsp(p.first);
  print(p.second);
}
template <class T>
inline void print(const T a) {
  for (auto i = a.begin(); i != a.end(); i++) {
    if (i != a.begin()) print(SP);
    print(*i);
  }
}
template <typename T>
inline void print(initializer_list<T> list) {
  for (auto i = list.begin(); i != list.end(); i++) {
    if (i != list.begin()) print(SP);
    print(*i);
  }
}
inline void println() { print(LF); }
inline void printsp() { print(SP); }
template <typename T>
inline void println(const T &a) {
  print(a);
  print(LF);
}
template <typename T>
inline void println(initializer_list<T> list) {
  for (auto i = list.begin(); i != list.end(); i++) {
    if (i != list.begin()) print(SP);
    print(*i);
  }
  print(LF);
}
template <typename T, typename... types>
inline void print(const T &a, const types &...args) {
  print(a);
  print(args...);
}
template <typename... types>
inline void println(const types &...args) {
  print(args...);
  print(LF);
}
template <typename... types>
inline void printsp(const types &...args) {
  print(args...);
  print(SP);
}
inline void printlnYN(bool b) { println(b ? "YES" : "NO"); }
inline void printlnyn(bool b) { println(b ? "Yes" : "No"); }
string caseN(int n, bool sharp = true, bool space = true) {
  return string("Case ") + (sharp ? "#" : "") + to_string(n) + ":" +
         (space ? " " : "");
}
inline int read(int &n) { return scanf("%d", &n); }
inline int read(int64_t &n) { return scanf("%" SCNd64, &n); }
template <typename T, typename... types>
inline int read(T &n, types &...args) {
  return read(n) == eof ? eof : read(args...) + 1;
}
inline char getcc() {
  char c;
  do c = getchar();
  while (isspace(c));
  return c;
}
inline int getint(int increment = 0) {
  int n;
  scanf("%d", &n);
  return n + increment;
}
inline int64_t getll(int64_t increment = 0) {
  int64_t n;
  scanf("%" SCNd64, &n);
  return n + increment;
}
inline double getdbl() {
  double n;
  scanf("%lf", &n);
  return n;
}
inline Pair getpair() {
  Pair p;
  scanf("%d%d", &p.first, &p.second);
  return p;
}
inline PairList getpairs(int n) {
  PairList v(n);
  for (Pair &p : v) {
    p = getpair();
  }
  return v;
}
}  // namespace IO
}  // namespace Infinity
int main(int, char *[]) {
  llong n = getll(), m = getll(), k = getll();
  llongs a;
  for (int i : Range(m)) {
    a.append(getll());
  }
  llong j = 0;
  llong l = 1, r = k, tr = 0;
  llong c = 0;
  while (j < m) {
    llong np = (a[j] - l) / k;
    l += k * np;
    r += k * np;
    while (j < m && a[j] <= r) {
      tr = 0;
      while (j < m && a[j] <= r) {
        j++;
        tr++;
      }
      c++;
      r += tr;
    }
  }
  println(c);
  return 0;
}
