#include <iostream>
using namespace std;
const int N = 1010;
int n, k;
int a[N];
int main()
{
cin >> n >> k;
for(int i = 1; i <= n; ++ i) cin >> a[i];
int cnt = 0, sum = 0;
for(int i = 1; i <= n; ++ i)
{
sum += a[i];
if(sum >= k)
{
sum = 0;
cnt ++;
}
else if(sum < k && i == n) cnt ++;
}
cout << cnt << endl;
return 0;
}