#include <bits/stdc++.h>
using namespace std;

int main()
{
    int a,b;
    cin>>a>>b;
    int l,s=0,sum=1;
    while(a--)
    {cin>>l;
    s=s+l;
    if(s<=b)
    sum++;
    }
    cout<<sum;
    return 0;
}
