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.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.*;

public class Main {public static void main(String[] args) throws Exception {new Solve();}}

class Solve { public Solve() throws Exception {solve();}
    void solve() throws Exception {
        int n = NI();
        int m = NI();
        int res = 1, t, sum = 0;
        for (int i = 0; i < n; i++) {
             t = NI();
            if (sum + t > m) {
                res++;
                sum = t;
            } else
                sum += t;
        }
        System.out.println(res);
    }

    class Pair {
        int i, j, wrong;
    }

    static BufferedReader stdin=new BufferedReader(new InputStreamReader(System.in));
    static StringTokenizer st=new StringTokenizer("");
    static Scanner sc = new Scanner(System.in);
    int min(int i1,int i2){return i1<i2?i1:i2;}
    long min(long i1,long i2){return i1<i2?i1:i2;}
    int max(int i1,int i2){return i1>i2?i1:i2;}
    long max(long i1,long i2){return i1>i2?i1:i2;}
    String NS()throws Exception{while(!st.hasMoreTokens())st=new StringTokenizer(stdin.readLine());return st.nextToken();}
    String NLn() throws Exception {return stdin.readLine();}
    int NI()throws Exception{return Integer.parseInt(NS());}
    long NL()throws Exception{return Long.parseLong(NS());}
    double ND()throws Exception{return Double.parseDouble(NS());}
    int abs(int x){return x<0?-x:x;}
}

class ArrayUtils {


    public static void mergeSort(int[] a) {
        int [] src = a.clone();
        mergeSortInt(src, a, 0, a.length);
    }
    public static void mergeSortInt(int[] src,int[] dest,int low,int high) {
        int length = high - low;
        if(length == 1){
            return;
        }
        if (length == 2) {
            if(dest[low] > dest[high-1]){
                int t = dest[low];
                dest[low] = dest[high-1];
                dest[high-1] = t;
            }
            return;
        }

        int mid = (low + high) >>> 1;
        mergeSortInt(dest, src, low, mid);
        mergeSortInt(dest, src, mid, high);

        // Merge sorted halves (now in src) into dest
        for(int i = low, p = low, q = mid; i < high; i++) {
            if (q >= high || p < mid && src[p] <= src[q])
                dest[i] = src[p++];
            else
                dest[i] = src[q++];
        }
    }

}