/******************************************************************************

                            Online C Compiler.
                Code, Compile, Run and Debug C program online.
Write your code in this editor and press "Run" button to compile and execute it.

*******************************************************************************/

int A[100];
int main(void) {
 
    int n,x;
    scanf("%d %d",&n,&x);
    int i = 0;
    for(i=0;i<n;i++){
        scanf("%d",&A[i]);
    }
    int count =0;
    int now =0;
    for(i=0;i<n;i++){
        if((now+A[i])<=x){
            now+=A[i];
            count++;
        }
        else
            i = n;
    }
    printf("%d",count+1);
    return 0;
}
