N, X = list(map(int, input().split()))

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



x = 0

ans = 1

for l in L:

    x += l

    if x <= X:

        ans += 1





print(ans)

from itertools import accumulate



# 入力

N, X = list(map(int, input().split()))

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



ans = sum(acc <= X for acc in accumulate(L)) + 1



# 出力

print(ans)

N, X = list(map(int, input().split()))
L = list(map(int, input().split()))
x = 0
ans = 1
for l in L:
    x += l
    if x <= X:
        ans += 1
print(ans)

from itertools import accumulate

# 入力
N, X = list(map(int, input().split()))
L = list(map(int, input().split()))
ans = sum(acc <= X for acc in accumulate(L)) + 1
# 出力
print(ans)

+from itertools import accumulate + +# 入力 -x = 0 -ans = 1 -for l in L: -    x += l -    if x <= X: -        ans += 1 +ans = sum(acc <= X for acc in accumulate(L)) + 1 +# 出力