#import <stdio.h>

int main(){
    int n,x;
    scanf("%d %d",&n,&x);
    int d = 0;
    for(int i=1;i<=n;i++){
        int y;
        scanf("%d",&y);
        d += y;
        if (d>x) {
            printf("%d",i);
            return 0;
        }
    }
    printf("%d",n+1);
    return 0;
}
