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

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

d = 0

ans = 0

for i in range(n):

    if x < d:

        break

    ans += 1

    d += l[i]

if x >= d:

    ans += 1

print(ans)
from bisect import bisect_right

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

l = [0] + list(map(int, input().split()))

for i in range(n):

    l[i + 1] += l[i]

print((bisect_right(l, x)))

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

from bisect import bisect_right

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

+from bisect import bisect_right + -l = list(map(int, input().split())) -d = 0 -ans = 0 +l = [0] + list(map(int, input().split())) -    if x < d: -        break -    ans += 1 -    d += l[i] -if x >= d: -    ans += 1 -print(ans) +    l[i + 1] += l[i] +print((bisect_right(l, x)))