# coding = SJIS
n, x = map(int, input().split())
lis = list(map(int, input().split()))
ans = 0

bou = [0]
for i in range(n):
    bou.append(bou[i] + lis[i])

for i in range(n + 1):
    if bou[i] <= x:
        ans += 1

print(ans) n, x = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split x lis = list(map(int, input().split())) lis list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split ans = 0 ans 0 bou = [0] bou [0] 0 for i in range(n):
    bou.append(bou[i] + lis[i]) i range(n) range n bou.append(bou[i] + lis[i]) bou.append bou append bou[i] + lis[i] bou[i] bou i lis[i] lis i for i in range(n + 1):
    if bou[i] <= x:
        ans += 1 i range(n + 1) range n + 1 n 1 if bou[i] <= x:
        ans += 1 bou[i] <= x bou[i] bou i x ans += 1 ans 1 print(ans) print ans n, x = map(int, input().split()) map(int, input().split()) n x = map(int, input().split()) map(int, input().split()) x ans += 1 1 ans lis = list(map(int, input().split())) list(map(int, input().split())) lis bou = [0] [0] bou ans = 0 0 ans
# coding = SJIS
n, x = map(int, input().split())
lis = list(map(int, input().split()))
ans = 0

bou = [0]
for i in range(n):
    bou.append(bou[i] + lis[i])

for i in range(n + 1):
    if bou[i] <= x:
        ans += 1

print(ans)