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

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



count = 1

s = 0

for num in nums:

    s += num

    if s <= x:

        count += 1

    else:

        break

print(count)
import sys



input = sys.stdin.readline



ri = lambda: int(eval(input()))

rs = lambda: input().rstrip()

ril = lambda: list(map(int, input().split()))

rsl = lambda: input().rstrip().split()

ris = lambda n: [ri() for _ in range(n)]

rss = lambda n: [rs() for _ in range(n)]

rils = lambda n: [ril() for _ in range(n)]

rsls = lambda n: [rsl() for _ in range(n)]



n, x = ril()

ls = ril()

s = 0

count = 0

for l in ls:

    s += l

    if s <= x:

        count += 1

    else:

        break

print((count + 1))
n, x = list(map(int, input().split()))
nums = list(map(int, input().split()))
count = 1
s = 0
for num in nums:
    s += num
    if s <= x:
        count += 1
    else:
        break
print(count)

import sys

input = sys.stdin.readline
ri = lambda: int(eval(input()))
rs = lambda: input().rstrip()
ril = lambda: list(map(int, input().split()))
rsl = lambda: input().rstrip().split()
ris = lambda n: [ri() for _ in range(n)]
rss = lambda n: [rs() for _ in range(n)]
rils = lambda n: [ril() for _ in range(n)]
rsls = lambda n: [rsl() for _ in range(n)]
n, x = ril()
ls = ril()
s = 0
count = 0
for l in ls:
    s += l
    if s <= x:
        count += 1
    else:
        break
print((count + 1))

-n, x = list(map(int, input().split())) -nums = list(map(int, input().split())) -count = 1 +import sys + +input = sys.stdin.readline +ri = lambda: int(eval(input())) +rs = lambda: input().rstrip() +ril = lambda: list(map(int, input().split())) +rsl = lambda: input().rstrip().split() +ris = lambda n: [ri() for _ in range(n)] +rss = lambda n: [rs() for _ in range(n)] +rils = lambda n: [ril() for _ in range(n)] +rsls = lambda n: [rsl() for _ in range(n)] +n, x = ril() +ls = ril() -for num in nums: -    s += num +count = 0 +for l in ls: +    s += l -print(count) +print((count + 1))