Vanya smashes potato in a vertical food processor. At each moment of time the height of the potato in the processor doesn't exceed h and the processor smashes k centimeters of potato each second. If there are less than k centimeters remaining, than during this second processor smashes all the remaining potato.

Vanya has n pieces of potato, the height of the i-th piece is equal to ai. He puts them in the food processor one by one starting from the piece number 1 and finishing with piece number n. Formally, each second the following happens:

  1. If there is at least one piece of potato remaining, Vanya puts them in the processor one by one, until there is not enough space for the next piece. 
  2. Processor smashes k centimeters of potato (or just everything that is inside). 



Provided the information about the parameter of the food processor and the size of each potato in a row, compute how long will it take for all the potato to become smashed.

Input

The first line of the input contains integers n, h and k (1 ≤ n ≤ 100 000, 1 ≤ k ≤ h ≤ 109) — the number of pieces of potato, the height of the food processor and the amount of potato being smashed each second, respectively.

The second line contains n integers ai (1 ≤ ai ≤ h) — the heights of the pieces.

Output

Print a single integer — the number of seconds required to smash all the potatoes following the process described in the problem statement.

Examples

Input

5 6 3
5 4 3 2 1


Output

5


Input

5 6 3
5 5 5 5 5


Output

10


Input

5 6 3
1 2 1 1 1


Output

2

Note

Consider the first sample. 

  1. First Vanya puts the piece of potato of height 5 into processor. At the end of the second there is only amount of height 2 remaining inside. 
  2. Now Vanya puts the piece of potato of height 4. At the end of the second there is amount of height 3 remaining. 
  3. Vanya puts the piece of height 3 inside and again there are only 3 centimeters remaining at the end of this second. 
  4. Vanya finally puts the pieces of height 2 and 1 inside. At the end of the second the height of potato in the processor is equal to 3. 
  5. During this second processor finally smashes all the remaining potato and the process finishes. 



In the second sample, Vanya puts the piece of height 5 inside and waits for 2 seconds while it is completely smashed. Then he repeats the same process for 4 other pieces. The total time is equal to 2·5 = 10 seconds.

In the third sample, Vanya simply puts all the potato inside the processor and waits 2 seconds.

import java.io.*;
import java.math.BigInteger;
import java.util.*;
import java.util.Map.Entry;

import static java.lang.Math.*;

public class Main {


	public static void solve(FastScanner fscan, BufferedWriter bw) throws IOException {
		double n = fscan.nextInt(),
			h = fscan.nextInt(),
			k = fscan.nextInt();

		long answer = 0;
		double iFill = 0;
		for (int i = 0; i < n; ++i) 
		{
			int a = fscan.nextInt();
			if( a + iFill < h) {
				iFill += a;
			}
			else if(a + iFill == h)
			{
				iFill += a;
				answer += iFill / k;
				iFill = iFill%k;
			}
			else
			{
				answer += iFill / k;
				if(iFill % k + a <= h)
				{
					iFill = iFill % k + a;
				}
				else
				{
					answer += 1;
					iFill = a;
				}
					
			}
		}
		answer += Math.ceil(iFill / k);
		bw.append(String.valueOf(answer));
	}

	/**************** ENTER HERE   ********************/
	public static void main(String[] args) throws Exception {
		
		if(args.length != 0){
			test();
			return;
		}
		
		FastScanner fscan = new FastScanner(System.in);
		BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
		solve(fscan,bw);
		bw.close();
	}
	
	/****   Test Static test cases      **/
	public static void test() throws IOException{
		String testcase[] = new String[]{};
		String answer[] = new String[]{};
		
		for (int i = 0; i < testcase.length; i++) {
			ByteArrayOutputStream result = new ByteArrayOutputStream();
			FastScanner fscan = new FastScanner(new ByteArrayInputStream(testcase[i].getBytes()));
			BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(result));
			
			solve(fscan, bw);
			
			String r = new String(result.toByteArray());
			if(! r.equals(answer[i])){
				String q = testcase[i];
				String a = answer[i];

				System.err.println("Wrong Answer on test:"+(i+1));
				System.err.println("Q:"+q);
				System.err.println("A:"+a);
				System.err.println("R:"+r);
			}
			
		}

	}
}






class IO {
	public static void readIntArray(int a[], int N, FastScanner fscan)
			throws IOException {
		readIntArray(a, N, 0, fscan);
	}

	public static void readIntArray(int a[], int N, int start, FastScanner fscan)
			throws IOException {
		for (int i = 0; i < N; i++) {
			a[start + i] = fscan.nextInt();
		}
	}

	public static void readArray(long a[], int N, FastScanner fscan)
			throws IOException {
		readArray(a, N, 0, fscan);
	}

	public static void readArray(long a[], int N, int start, FastScanner fscan)
			throws IOException {
		for (int i = 0; i < N; i++) {
			a[start + i] = fscan.nextInt();
		}
	}
}

class FastScanner {
	InputStream is;
	byte buff[] = new byte[1024];
	int currentChar = -1;
	int buffChars = 0;

	public FastScanner(InputStream inputStream) {
		is = inputStream;
	}

	public boolean hasNext() throws IOException {
		return currentChar == -1 || buffChars > 0;
	}

	public char nextChar() throws IOException {
		// if we already have that next char read, just return else input
		if (currentChar == -1 || currentChar >= buffChars) {
			currentChar = 0;
			buffChars = is.read(buff);
		}

		if (buffChars <= 0) {
			throw new RuntimeException("No char found...");
		}

		int ch;
		while (isSpace(ch = nextCharAsInt()))
			;
		return (char) ch;
	}

	public int nextCharAsInt() throws IOException {
		// if we already have that next char read, just return else input
		if (currentChar == -1 || currentChar >= buffChars) {
			currentChar = 0;
			buffChars = is.read(buff);
		}

		if (buffChars <= 0) {
			return -1;
		}
		return (char) buff[currentChar++];
	}

	public String nextLine() throws IOException {
		StringBuilder bldr = new StringBuilder();
		int ch;
		while (isLineEnd(ch = nextCharAsInt()))
			// ignore empty lines ???
			;

		do {
			bldr.append((char) ch);
		} while (!isLineEnd(ch = nextCharAsInt()));

		return bldr.toString();
	}

	public String nextString() throws IOException {
		StringBuilder bldr = new StringBuilder();
		int ch;
		while (isSpace(ch = nextCharAsInt()))
			;

		do {
			bldr.append((char) ch);
		} while (!isSpace(ch = nextCharAsInt()));

		return bldr.toString();
	}

	public int nextInt() throws IOException {
		// considering ASCII files--> 8 bit chars, unicode files has 16 bit
		// chars (byte1 then byte2)
		int result = 0;
		int sign = 1;
		int ch;
		while (isSpace(ch = nextCharAsInt()))
			;

		if (ch == '-') {
			sign = -1;
			ch = nextCharAsInt();
		}

		do {
			if (ch < '0' || ch > '9')
				throw new NumberFormatException("Found '" + ch
						+ "' while parsing for int.");

			result *= 10;
			result += ch - '0';
		} while (!isSpace(ch = nextCharAsInt()));

		return sign * result;
	}

	public long nextLong() throws IOException {
		// considering ASCII files--> 8 bit chars, unicode files has 16 bit
		// chars (byte1 then byte2)
		long result = 0;
		int sign = 1;
		int ch;
		while (isSpace(ch = nextCharAsInt()))
			;

		if (ch == '-') {
			sign = -1;
			ch = nextCharAsInt();
		}

		do {
			if (ch < '0' || ch > '9')
				throw new NumberFormatException("Found '" + ch
						+ "' while parsing for int.");

			result *= 10;
			result += ch - '0';
		} while (!isSpace(ch = nextCharAsInt()));

		return sign * result;
	}

	private boolean isLineEnd(int ch) {
		return ch == '\n' || ch == '\r' || ch == -1;
	}

	private boolean isSpace(int ch) {
		return ch == '\n' || ch == ' ' || ch == '\t' || ch == '\r' || ch == -1;
	}

	public void close() throws IOException {
		is.close();
	}
}
