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.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.HashMap;
import java.util.HashSet;
import java.util.StringTokenizer;


/*07:05:45PM

String x =sc.next();
char inp [] = x.toCharArray();
	SimpleDateFormat displayFormat = new SimpleDateFormat("HH:mm");
	SimpleDateFormat parseFormat = new SimpleDateFormat("hh:mm a");
	Date date = parseFormat.parse(x.substring(0, 5)+" "+x.substring(8, 10));
	System.out.println(displayFormat.format(date)+":"+x.substring(6, 8));
*/








public class Main {
	static int n,m;	
	static int arr[][];

	public static boolean available(int x , int y)
	{
		return x >=0 &&y>=0 &&x<n &&y<m &&arr[x][y]!=-1;
	}
	public static void main(String[] args) throws Exception {
		PrintWriter out = new PrintWriter(System.out);
		StringBuilder sb = new StringBuilder();
		Scanner sc = new Scanner(System.in);
		
		int n =sc.nextInt() , m=sc.nextInt();
		int arr[]=new int [n];
		for (int i = 0; i < n; i++) {
			arr[i]=sc.nextInt();
		}
		
		int cnt=0;
		for (int i = 0; i < arr.length; i++) {
			int acc=0;
			while(i<arr.length && acc+arr[i]<=m)acc+=arr[i++];
			i--;
			cnt++;
		}
		
		System.out.println(cnt);
		
		
		
		
	}
}








class Pair 
{
	public int  x  ,y ;
	Pair(int a , int b)
	{
		x=a;y=b;
	}
	@Override
	public boolean equals(Object obj) {
		// TODO Auto-generated method stub
		return x==((Pair)(obj)).x && y==((Pair)obj).y;
	}
	
	@Override
	public int hashCode() {
		// TODO Auto-generated method stub
		return 6*x +8*y;
	}
	
}

 class Scanner 
{
	StringTokenizer st;
	BufferedReader br;

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

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

	public int nextInt() throws IOException {return Integer.parseInt(next());}
	
	public long nextLong() throws IOException {return Long.parseLong(next());}

	public String nextLine() throws IOException {return br.readLine();}
	
	public double nextDouble() throws IOException
	{
		String x = next();
		StringBuilder sb = new StringBuilder("0");
		double res = 0, f = 1;
		boolean dec = false, neg = false;
		int start = 0;
		if(x.charAt(0) == '-')
		{
			neg = true;
			start++;
		}
		for(int i = start; i < x.length(); i++)
			if(x.charAt(i) == '.')
			{
				res = Long.parseLong(sb.toString());
				sb = new StringBuilder("0");
				dec = true;
			}
			else
			{
				sb.append(x.charAt(i));
				if(dec)
					f *= 10;
			}
		res += Long.parseLong(sb.toString()) / f;
		return res * (neg?-1:1);
	}
	
	public boolean ready() throws IOException {return br.ready();}


}