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

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



count = 0

prev = 0

now = 0

for l in ls:

    now = prev + l

    if now <= x:

        count += 1

    else:

        break

    prev += l



print((count + 1))
N, X = list(map(int, input().split()))

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



d, res = 0, 1

for l in L:

    d += l

    if d <= X:

        res += 1

    else:

        break

print(res)

n, x = list(map(int, input().split()))
ls = list(map(int, input().split()))
count = 0
prev = 0
now = 0
for l in ls:
    now = prev + l
    if now <= x:
        count += 1
    else:
        break
    prev += l
print((count + 1))

N, X = list(map(int, input().split()))
L = list(map(int, input().split()))
d, res = 0, 1
for l in L:
    d += l
    if d <= X:
        res += 1
    else:
        break
print(res)

-n, x = list(map(int, input().split())) -ls = list(map(int, input().split())) -count = 0 -prev = 0 -now = 0 -for l in ls: -    now = prev + l -    if now <= x: -        count += 1 +N, X = list(map(int, input().split())) +L = list(map(int, input().split())) +d, res = 0, 1 +for l in L: +    d += l +    if d <= X: +        res += 1 -    prev += l -print((count + 1)) +print(res)