n,x = map(int,input().split())
L = list(map(int,input().split()))

c=1
suml=0
for i in range(n):
    if x>=L[i]+suml :
        c+=1
        suml+=L[i]
    else:
        break
print(c) n,x = map(int,input().split()) n map(int,input().split()) map int input().split() ().split () input split x L = list(map(int,input().split())) L list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split c=1 c 1 suml=0 suml 0 for i in range(n):
    if x>=L[i]+suml :
        c+=1
        suml+=L[i]
    else:
        break i range(n) range n if x>=L[i]+suml :
        c+=1
        suml+=L[i]
    else:
        break x>=L[i]+suml x L[i]+suml L[i] L i suml c+=1 c 1 suml+=L[i] suml L[i] L i break print(c) print c n,x = map(int,input().split()) map(int,input().split()) n c=1 1 c suml=0 0 suml x = map(int,input().split()) map(int,input().split()) x L = list(map(int,input().split())) list(map(int,input().split())) L c+=1 1 c suml+=L[i] L[i] suml
n,x = map(int,input().split())
L = list(map(int,input().split()))

c=1
suml=0
for i in range(n):
    if x>=L[i]+suml :
        c+=1
        suml+=L[i]
    else:
        break
print(c)