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.util.*;
public class tr3 {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		long n=sc.nextLong();
		int m=sc.nextInt();
		long k=sc.nextLong();
		long []a=new long[m];
		for(int i=0;i<m;i++)
			a[i]=sc.nextLong();
		int ans=0;
		long shift=0;
		long page=1;
		for(int i=0;i<m;i++) {
			long c=0;
			int j=i;
			page=(a[j]-shift-1)/k+1;
			for(;j<m && (a[j]-shift-1)/k+1==page;j++) {
				c++;
			}
			shift+=c;
			i=j-1;
			//System.out.println(i+" "+shift+" "+page);
			ans++;
		}
		out.println(ans);
		out.flush();
	}
	static final double EPS = 1e-9;
static public class Circle { 	//equation: (x-c.x)^2 + (y-c.y)^2 = r^2

	static final double EPS = 1e-9;
	
	Point c;
	double r;

	Circle(Point p, double k) { c = p; r = k; }

	int inside(Point p)	//1 for inside, 0 for border, -1 for outside
	{
		double d = p.dist(c);

		return d + EPS < r ? 1 : Math.abs(d - r) < EPS ? 0 : -1;
	}

	double circum()	{ return 2 * Math.PI * r; }

	double area() { return Math.PI * r * r; }

	double arcLength(double deg) { return deg / 360.0 * circum(); }		//major and minor chords exist
	double sectorArea(double deg) { return deg / 360.0 * area(); }
	boolean intersect(Circle cir)
	{
		return c.dist(cir.c) <= r + cir.r + EPS && c.dist(cir.c) + EPS >= Math.abs(r - cir.r);
	}
	//returns true if the circle intersects with the line segment defined by p and q at one or two points
	boolean intersect(Point p, Point q)
	{
		Line l = new Line(p, q);
		if(Math.abs(l.b) < EPS)
		{
			if(l.c * l.c > r * r + EPS)
				return false;

			double y1 = Math.sqrt(Math.abs(r * r - l.c * l.c)), y2 = -y1;
			return new Point(-l.c, y1).between(p, q) && new Point(-l.c, y2).between(p, q);
		}
		double a = l.a * l.a + 1, b = 2 * l.a * l.c, c = l.c * l.c - r * r;
		if(b * b - 4 * a * c + EPS < 0)
			return false;

		double dis = b * b - 4 * a * c;

		double x1 = (-b + Math.sqrt(dis)) / (2.0 * a), x2 = (-b - Math.sqrt(dis)) / (2.0 * a);

		return new Point(x1, - l.a * x1 - l.c).between(p, q) || new Point(x2, - l.a * x2 - l.c).between(p, q);
	}

	static Point findCenter(Point p, Point q, double r)		//for the other center, swap p and q
	{
		double d2 = (p.x - q.x) * (p.x - q.x) + (p.y - q.y) * (p.y - q.y);
		double det = r * r / d2 - 0.25;
		if(Math.abs(det) < EPS)
			det = 0.0;
		if(det < 0.0)
			return null;
		double h = Math.sqrt(det);
		return new Point((p.x + q.x) / 2.0 + (p.y - q.y) * h, (p.y + q.y) / 2.0 + (q.x - p.x) * h);
	}

}	
static public class Line {

		static final double INF = 1e9, EPS = 1e-9;
		
		double a, b, c;
		
		Line(Point p, Point q)
		{
			if(Math.abs(p.x - q.x) < EPS) {	a = 1; b = 0; c = -p.x;	}
			else
			{
				a = (p.y - q.y) / (q.x - p.x);
				b = 1.0;
				c = -(a * p.x + p.y);
			}
						
		}
		
		Line(Point p, double m) { a = -m; b = 1; c =  -(a * p.x + p.y); } 
		
		boolean parallel(Line l) { return Math.abs(a - l.a) < EPS && Math.abs(b - l.b) < EPS; }
		
		boolean same(Line l) { return parallel(l) && Math.abs(c - l.c) < EPS; }
		
		Point intersect(Line l)
		{
			if(parallel(l))
				return null;
			double x = (b * l.c - c * l.b) / (a * l.b - b * l.a);
			double y;
			if(Math.abs(b) < EPS)
				 y = -l.a * x - l.c;
			else
				y = -a * x - c;
			
			return new Point(x, y);
		}
		
		Point closestPoint(Point p)
		{
			if(Math.abs(b) < EPS) return new Point(-c, p.y);
			if(Math.abs(a) < EPS) return new Point(p.x, -c);
			return intersect(new Line(p, 1 / a));
		}
				
	}  
static public class Point implements Comparable<Point>{

	static final double EPS = 1e-9;

	double x, y;                  

	Point(double a, double b) { x = a; y = b; }  
	
	public int compareTo(Point p)
	{
		if(Math.abs(x - p.x) > EPS) return x > p.x ? 1 : -1;
		if(Math.abs(y - p.y) > EPS) return y > p.y ? 1 : -1;
		return 0;
	}
	public String toString () {
		return x+" "+y;
	}
	public double dist(Point p) { return Math.sqrt(sq(x - p.x) + sq(y - p.y)); }
	
	static double sq(double x) { return x * x; }
	
	Point rotate(double angle)
	{
		double c = Math.cos(angle), s = Math.sin(angle);
		return new Point(x * c - y * s, x * s + y * c);
	}
	// for integer points and rotation by 90 (counterclockwise) : swap x and y, negate x
	boolean between(Point p, Point q)
	{
		return x < Math.max(p.x, q.x) + EPS && x + EPS > Math.min(p.x, q.x)
				&& y < Math.max(p.y, q.y) + EPS && y + EPS > Math.min(p.y, q.y);
	}
}
	static class Scanner {
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream system) {
			br = new BufferedReader(new InputStreamReader(system));
		}

		public Scanner(String file) throws Exception {
			br = new BufferedReader(new FileReader(file));
		}

		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public String nextLine() throws IOException {
			return br.readLine();
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		public double nextDouble() throws IOException {
			return Double.parseDouble(next());
		}

		public char nextChar() throws IOException {
			return next().charAt(0);
		}

		public Long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		public boolean ready() throws IOException {
			return br.ready();
		}

		public void waitForInput() throws InterruptedException {
			Thread.sleep(3000);
		}
	}
}