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.
//Comment out before submit
//package Round355Div2.ProblemB;

/**
 * Created by evergreen on 6/1/16.
 */

/*
ID: najmul.1
LANG: JAVA
TASK: VanyaAndFoodProcessor
*/

import java.io.*;
import java.util.*;
import java.util.stream.Collectors;

public class VanyaAndFoodProcessor {

    private static MyScanner input;
    private static PrintWriter output;

    private static void solve() {

        int n = input.nextInt();
        int h = input.nextInt();
        int k = input.nextInt();

        List<Integer> integers = input.nextIntegers(n);

        long curr = 0;
        long time = 0;

        for (int i = 0; i < integers.size(); i++) {
            Integer nextPotatoHeight = integers.get(i);
            if(curr + nextPotatoHeight <= h) {

                curr = curr + nextPotatoHeight;
                continue;
            }
            --i;
            long toBeReduced = curr + nextPotatoHeight - h;
            long temp = (toBeReduced / k) + (toBeReduced % k > 0 ? 1 : 0);
            time += temp;
            curr = Math.max(0, curr - temp * k);
        }

        time = time + (curr / k) + (curr % k > 0 ? 1 : 0);

        output.println(time);
        output.flush();
    }

    public static void main(String[] args) throws FileNotFoundException {

        input = SmartInOut.getInitInput();
        output = SmartInOut.getInitOutput();

//        output.print(100000);
//        output.print(" ");
//        output.print(1000000000);
//        output.print(" ");
//        output.println(1);
//
//        output.print(1000000000);
//        for (int i = 1; i < 100000; i++) {
//
//            output.print(" " + 1000000000);
//        }
//        output.println();

        //for (int i = 0; i < 5; i++)
        solve();
        output.close();
    }
}

class SmartInOut {

    private static MyScanner input;
    private static PrintWriter output;

    private static String getFilePathPrefix() {

        String filePathPrefix = "";

        Class<? extends VanyaAndFoodProcessor> aClass = new VanyaAndFoodProcessor().getClass();
        Package aPackage = aClass.getPackage();

        if (aPackage != null) {
            String packageName = aPackage.getName();
            String partialPath = packageName.replace(".", "/");
            filePathPrefix = "src/" + partialPath + "/";
        }

        return filePathPrefix;
    }

    public static MyScanner getInitInput() throws FileNotFoundException {

        String filePath = getFilePathPrefix() + "VanyaAndFoodProcessor.in";
        File f = new File(filePath);
        input = f.exists() && !f.isDirectory() ? new MyScanner(filePath) : new MyScanner();
        return input;
    }

    public static PrintWriter getInitOutput() throws FileNotFoundException {

        String filePathPrefix = getFilePathPrefix();
        File f = new File(filePathPrefix + "VanyaAndFoodProcessor.in");
        String outputFilePath = filePathPrefix + "VanyaAndFoodProcessor.out";

        output = f.exists() && !f.isDirectory() ? new PrintWriter(outputFilePath) : new PrintWriter(System.out);
        return output;
    }
}

class MyScanner {

    BufferedReader br;
    StringTokenizer st;

    public MyScanner() {
        br = new BufferedReader(new InputStreamReader(System.in));
    }

    public MyScanner(String s) {
        try {
            br = new BufferedReader(new FileReader(s));
        } catch (FileNotFoundException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
    }

    String nextToken() {
        while (st == null || !st.hasMoreElements()) {
            try {
                st = new StringTokenizer(br.readLine());
            } catch (IOException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
        }
        return st.nextToken();
    }

    int nextInt() {
        return Integer.parseInt(nextToken());
    }

    long nextLong() {
        return Long.parseLong(nextToken());
    }

    double nextDouble() {
        return Double.parseDouble(nextToken());
    }

    public List<String> nextStringsOfCurrentLine() throws IOException {

        //Modify it if you need a different delimiter
        String delimiter = " ";
        String st = br.readLine();
        List<String> list = Arrays.asList(st.split(delimiter));
        return list;
    }

    public List<String> nextStringList(int howMany) {

        List<String> list = new ArrayList<String>();
        while (howMany-- > 0) {

            String st = nextToken();
            list.add(st);
        }
        return list;
    }

    public List<Integer> nextIntegers(int howMany) {

        List<Integer> list = new ArrayList<Integer>();
        while (howMany-- > 0) {

            int st = nextInt();
            list.add(st);
        }
        return list;
    }

    public List<Double> nextDoubleList(int howMany) {

        List<Double> list = new ArrayList<Double>();
        while (howMany-- > 0) {

            double st = nextDouble();
            list.add(st);
        }
        return list;
    }
}

class BasicUtility {

    //you can join Strings, ints, longs, doubles etc
    public static <T> String joinItems(List<T> list) {

        String delimiter = " ";
        String formattedJoin = BasicUtility.joinItemsWithDelimiter(delimiter, list);

        return formattedJoin;
    }

    //you can join Strings, ints, longs, doubles etc
    public static <T> String joinItemsWithDelimiter(String delimiter, List<T> list) {

        String formattedJoin = "";
        int count = list.size();
        for (int i = 0; i < count - 1; ++i) {

            //Join all elements except last element
            formattedJoin += (list.get(i) + delimiter);
        }

        if (count > 1) {
            //Now join last element
            formattedJoin += list.get(count - 1);
        }

        //For Java 8
        //String formattedJoin = list.stream().map(i -> i.toString()).collect(Collectors.joining(delimiter));

        return formattedJoin;
    }

    public static <T> List<T> getCopyList(List<T> list) {
        //pre java 8
        //List<T> copiedList = new ArrayList<T>(list);

        //For Java 8
        List<T> copiedList = list.stream().collect(Collectors.toList());
        return copiedList;
    }
}
