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

l=list(map(int,input().split()))

m=[0]

ans=1

for i in range(n):

  m+=[m[i]+l[i]]

  if m[i]+l[i]<=x:

    ans+=1

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

l=list(map(int,input().split()))

ans=1

d=0

for i in range(n):

  d+=l[i]

  if d<=x:

    ans+=1

print(ans)
n, x = list(map(int, input().split()))
l = list(map(int, input().split()))
m = [0]
ans = 1
for i in range(n):
    m += [m[i] + l[i]]
    if m[i] + l[i] <= x:
        ans += 1
print(ans)

n, x = list(map(int, input().split()))
l = list(map(int, input().split()))
ans = 1
d = 0
for i in range(n):
    d += l[i]
    if d <= x:
        ans += 1
print(ans)

-m = [0] +d = 0 -    m += [m[i] + l[i]] -    if m[i] + l[i] <= x: +    d += l[i] +    if d <= x: