n,x = list(map(int, input("").split()))
l=list(map(int, input("").split()))
d=0
k=1
for i in l:
    d+=i
    if d <=x :
        k+=1
    else:
        break
print(k) n,x = list(map(int, input("").split())) n list(map(int, input("").split())) list 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 d=0 d 0 k=1 k 1 for i in l:
    d+=i
    if d <=x :
        k+=1
    else:
        break i l d+=i d i if d <=x :
        k+=1
    else:
        break d <=x d x k+=1 k 1 break print(k) print k l=list(map(int, input("").split())) list(map(int, input("").split())) l k=1 1 k k+=1 1 k n,x = list(map(int, input("").split())) list(map(int, input("").split())) n x = list(map(int, input("").split())) list(map(int, input("").split())) x d=0 0 d d+=i i d
n,x = list(map(int, input("").split()))
l=list(map(int, input("").split()))
d=0
k=1
for i in l:
    d+=i
    if d <=x :
        k+=1
    else:
        break
print(k)