import java.util.Scanner;
public class tyt
{
public static void main(String[] args)
{
Scanner in = new Scanner(System.in);
int n = in.nextInt();
int k = in.nextInt();
int count = 0;
int a = 0, b = 0;
for (int i = 0; i < n; i++)
{
if (b < k && i != n - 1)
{
b += in.nextInt();
}
if (b >= k || i == n - 1)
{
a++;
b = 0;
}
}
System.out.println(a);
}
}