It's that time of the year when the Russians flood their countryside summer cottages (dachas) and the bus stop has a lot of people. People rarely go to the dacha on their own, it's usually a group, so the people stand in queue by groups.

The bus stop queue has n groups of people. The i-th group from the beginning has ai people. Every 30 minutes an empty bus arrives at the bus stop, it can carry at most m people. Naturally, the people from the first group enter the bus first. Then go the people from the second group and so on. Note that the order of groups in the queue never changes. Moreover, if some group cannot fit all of its members into the current bus, it waits for the next bus together with other groups standing after it in the queue.

Your task is to determine how many buses is needed to transport all n groups to the dacha countryside.

Input

The first line contains two integers n and m (1 ≤ n, m ≤ 100). The next line contains n integers: a1, a2, ..., an (1 ≤ ai ≤ m).

Output

Print a single integer — the number of buses that is needed to transport all n groups to the dacha countryside.

Examples

Input

4 3
2 3 2 1


Output

3


Input

3 4
1 2 1


Output

1
import java.awt.*;
import java.io.*;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import java.util.StringTokenizer;

public class Main implements Runnable {
    final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;
    final Scanner in;
    Writer out;
    long timeBegin, timeEnd;

    public Main() throws FileNotFoundException {
        Locale.setDefault(Locale.US);
        if (ONLINE_JUDGE) {
            in = new Scanner(new InputStreamReader(System.in));
            out = new Writer(System.out);
        } else {
            in = new Scanner(new FileReader("input.txt"));
            //out = new Writer("output.txt");
            out = new Writer(System.out);
        }
    }

    public static void main(String[] args) throws FileNotFoundException {
        new Thread(null, new Main(), "", 128 * (1L << 20)).start();
    }

    void time() {
        timeEnd = System.currentTimeMillis();
        System.err.println("Time: " + (timeEnd - timeBegin) + "ms");
    }

    public void run() {
        try {
            timeBegin = System.currentTimeMillis();
            solve();
            out.close();
            time();
        } catch (Exception e) {
            e.printStackTrace(System.err);
            System.exit(-1);
        }
    }

    void solve() throws IOException, ParseException {
        int n = in.nextInt(), m = in.nextInt();
        int[] a = in.nextIntArray(n);
        int s = 0, k = 0;
        for (int i = 0; i < n; i++) {
            if (s + a[i] <= m) s += a[i];
            else {
                k++;
                s = a[i];
            }
        }
        k++;
        out.print(k);
    }
}

class Scanner {
    BufferedReader in;
    StringTokenizer stringTokenizer;

    public Scanner(InputStreamReader inputStreamReader) throws FileNotFoundException {
        in = new BufferedReader(inputStreamReader);
    }

    String next() {
        while (stringTokenizer == null || !stringTokenizer.hasMoreElements()) {
            try {
                stringTokenizer = new StringTokenizer(in.readLine());
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        return stringTokenizer.nextToken();
    }

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

    int[] nextIntArray(int size) throws IOException {
        int[] array = new int[size];
        for (int index = 0; index < size; ++index) {
            array[index] = nextInt();
        }
        return array;
    }

    ArrayList<Integer> nextIntArrayList(int size) {
        ArrayList<Integer> result = new ArrayList<>();
        for (int i = 0; i < size; i++) {
            result.add(nextInt());
        }
        return result;
    }

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

    long[] readLongArray(int size) throws IOException {
        long[] array = new long[size];
        for (int index = 0; index < size; ++index) {
            array[index] = nextLong();
        }
        return array;
    }

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

    double[] readDoubleArray(int size) throws IOException {
        double[] array = new double[size];

        for (int index = 0; index < size; ++index) {
            array[index] = nextDouble();
        }

        return array;
    }

    char nextChar() throws IOException {
        int intValue = in.read();
        while (intValue == 10 || intValue == 13) {
            intValue = in.read();
        }
        if (intValue == -1) {
            return '\0';
        }
        return (char) intValue;
    }

    char[] readCharArray() throws IOException {
        return nextLine().toCharArray();
    }

    BigInteger readBigInteger() throws IOException {
        return new BigInteger(next());
    }

    BigDecimal readBigDecimal() throws IOException {
        return new BigDecimal(next());
    }

    Point nextPoint() throws IOException {
        int x = nextInt(), y = nextInt();
        return new Point(x, y);
    }

    Point[] nextPointArray(int size) throws IOException {
        Point[] array = new Point[size];

        for (int index = 0; index < size; ++index) {
            array[index] = nextPoint();
        }

        return array;
    }

    List<Integer>[] readGraph(int vertexNumber, int edgeNumber) throws IOException {
        @SuppressWarnings("unchecked")
        List<Integer>[] graph = new List[vertexNumber];

        for (int index = 0; index < vertexNumber; ++index) {
            graph[index] = new ArrayList<>();
        }

        while (edgeNumber-- > 0) {
            int from = nextInt() - 1;
            int to = nextInt() - 1;

            graph[from].add(to);
            graph[to].add(from);
        }

        return graph;
    }


    String nextLine() {
        String str = "";
        try {
            str = in.readLine();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return str;
    }
}

class Writer extends PrintWriter {
    final int DEFAULT_PRECISION = 12;

    int precision;
    String format, formatWithSpace;

    {
        precision = DEFAULT_PRECISION;

        format = createFormat(precision);
        formatWithSpace = format + " ";
    }

    public Writer(OutputStream out) {
        super(out);
    }

    public Writer(String fileName) throws FileNotFoundException {
        super(fileName);
    }

    public int getPrecision() {
        return precision;
    }

    public void setPrecision(int precision) {
        precision = Math.max(0, precision);
        this.precision = precision;

        format = createFormat(precision);
        formatWithSpace = format + " ";
    }

    public <T> void printMany(List<T> list) {
        for (T element : list) {
            print(element);
            print(" ");
        }
    }

    public void printArray(int[] a) {
        for (int element : a) {
            print(element);
            print(" ");
        }
    }

    private String createFormat(int precision) {
        return "%." + precision + "f";
    }

    @Override
    public void print(double d) {
        printf(format, d);
    }

    public void printWithSpace(double d) {
        printf(formatWithSpace, d);
    }

    public void printAll(double... d) {
        for (int i = 0; i < d.length - 1; ++i) {
            printWithSpace(d[i]);
        }

        print(d[d.length - 1]);
    }

    @Override
    public void println(double d) {
        printlnAll(d);
    }

    public void printlnAll(double... d) {
        printAll(d);
        println();
    }
}