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