#include <bits/stdc++.h>   using namespace std;   void __print(int x) { cerr << x; };   void __print(long x) { cerr << x; };   void __print(long long x) { cerr << x; };   void __print(unsigned x) { cerr << x; };   void __print(unsigned long x) { cerr << x; };   void __print(unsigned long long x) { cerr << x; };   void __print(float x) { cerr << x; };   void __print(double x) { cerr << x; };   void __print(long double x) { cerr << x; };   void __print(char x) { cerr <<      << x <<     ; };   void __print(const char *x) { cerr <<     << x <<    ; };   void __print(const string &x) { cerr <<     << x <<    ; };   void __print(bool x) { cerr << (x ?  true  :  false ); }   long long powmod(long long a, long long b) {     long long res = 1;     a %= 1000000007;     assert(b >= 0);     for (; b; b >>= 1) {       if (b & 1) res = res * a % 1000000007;       a = a * a % 1000000007;     }     return res;   }   long long string_to_int(string s) {     long long ans = 0;     long long p = 1;     for (long long i = s.size() - 1; i >= 0; i--) {       ans += (s[i] -  0 ) * p;       p *= 10;     }     return ans;   }   long long fast_pow(long long a, long long b) {     if (b == 1) return a;     if (b == 0) return 1;     long long x = fast_pow(a, b / 2);     x *= x;     if (b & 1) x *= a;     return x;   }   template <typename T, typename V>   void __print(const pair<T, V> &x) {     cerr <<  { ;     __print(x.first);     cerr <<  , ;     __print(x.second);     cerr <<  } ;   }   template <typename T>   void __print(const T &x) {     long long f = 0;     cerr <<  { ;     for (auto &i : x) cerr << (f++ ?  ,  :   ), __print(i);     cerr <<  } ;   }   void _print() { cerr <<  ] n ; }   template <typename T, typename... V>   void _print(T t, V... v) {     __print(t);     if (sizeof...(v)) cerr <<  ,  ;     _print(v...);   }   void t_c_c() {     ios_base::sync_with_stdio(0);     cin.tie(0);     cout.tie(0);     long long n, m, k;     cin >> n >> m >> k;     long long arr[m];     for (long long i = 0; i < m; i++) {       cin >> arr[i];     }     long long days = 0;     long long pages = k;     long long point = 0;     long long x = 0;     long long xx = 0;     for (long long i = 0; i < m;) {       if (arr[i] - x <= pages) {         while (arr[i] - xx <= pages) {           ;           x++;           i++;         }         xx = x;         days++;       } else {         long long factor = ((arr[i] - x) - pages) / k;         pages +=             (((arr[i] - x) - pages) % k == 0 ? factor * k : (factor + 1) * k);       }     }     cout << days <<   n ;   }   int32_t main() {     t_c_c();     return 0;   }   