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

import  java.io.*;
import  java.math.*;
import java.nio.Buffer;
import java.sql.SQLSyntaxErrorException;
import  java.util.*;
import  java.text.*;
import java.util.stream.Collectors;

public class Main {

    public  static  int c(int n,int m){
        int count=1;
        for(int i=1;i<=m;i++){
            count*=(n-i+1);
        }
        for(int i=2;i<=m;i++){
            count=count/i;
        }
        return count;
    }
    public static void reset(){
        System.out.println("R");
    }
    public  static boolean query(int x){
        Scanner cin = new Scanner(System.in);
        System.out.printf("? %d\n",x+1);
        String str=cin.next();
        char s[]=str.toCharArray();
        if(s[0]=='Y'){
            return true;
        }
        else{
            return false;
        }
    }
    public  static long dis(long x,long y,long x1,long y1){
        return Math.abs(x-x1)+Math.abs(y-y1);
    }
    static final char[] VALUES = { 'S', 'E', 'T' };

    static int[][][][]dp=new int[105][100][100][2];
    static int []num;
    static int MOD = 1000000007;


    public static void main(String[] args) {
        Scanner cin = new Scanner(System.in);
        long n=cin.nextLong();
        int  m=cin.nextInt();
        long k=cin.nextLong();
        long num[]=new long[m];
        for(int i=0;i<m;i++){
            num[i]=cin.nextLong();
        }
        long max=k;
        long sub=0;
        long ans=0;
        for(int i=0;i<m;i++){
            long count=0;
            if(num[i]-sub>max){
                long st=num[i]-sub;
                long val=(num[i]-sub)/k+((num[i]-sub)%k==0?0:1);
                max=val*k;
            }
            while(i<m&&num[i]-sub<=max){
                i++;
                count++;
            }
            sub+=count;
            ans++;
        }
        System.out.println(ans);



    }
    public  static int slove(int idx,int odd,int even,int lst){
            if(odd<0||even<0){
                return Integer.MAX_VALUE;
            }
            if(idx==num.length){
                return 0;
            }
            if(dp[idx][odd][even][lst]!=0){
                return dp[idx][odd][even][lst];
            }
            int res=Integer.MAX_VALUE;
            if(num[idx]!=0){
                res=slove(idx+1,odd,even,num[idx]%2);
                res+=num[idx]%2==lst?0:1;
                dp[idx][odd][even][lst]=res;
            }
            else{
                res=slove(idx+1,odd-1,even,0);
                int r=slove(idx+1,odd,even-1,1);
                if(res!=Integer.MAX_VALUE)res+= lst==0?0:1;
                if(r!=Integer.MAX_VALUE) r+= lst==0?1:0;
                dp[idx][odd][even][lst]=Math.min(res, r);
            }
            return dp[idx][odd][even][lst];
        }
    public static String compute(String x,String y){
        StringBuilder result=new StringBuilder();
        for(int i=0;i<x.length();i++){
            char a=x.charAt(i);
            char b=y.charAt(i);

            char ch;
            if(a==b){
                ch=a;
            }
            else{
                for(int j=0;;j++){
                    if(VALUES[j]!=a&&VALUES[j]!=b){
                        ch=VALUES[j];
                        break;
                    }
                }
            }
            result.append(ch);
        }
        return result.toString();

    }
    }

 	    		  			 	 							 	 	  		