#k = int(input())
#s = input()
#a, b = map(int, input().split())
#s, t = map(str, input().split())
#l = list(map(int, input().split()))
#l = [list(map(int,input().split())) for i in range(n)]


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

temp = []

temp.append(0)
last = 0
for i in range(n):
    temp.append(last+l[i])
    last += l[i]
ans = 0
for i in range(n+1):
    if temp[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 l = list(map(int, input().split())) l list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split temp = [] temp [] temp.append(0) temp.append temp append 0 last = 0 last 0 for i in range(n):
    temp.append(last+l[i])
    last += l[i] i range(n) range n temp.append(last+l[i]) temp.append temp append last+l[i] last l[i] l i last += l[i] last l[i] l i ans = 0 ans 0 for i in range(n+1):
    if temp[i] <= x:
        ans += 1 i range(n+1) range n+1 n 1 if temp[i] <= x:
        ans += 1 temp[i] <= x temp[i] temp i x ans += 1 ans 1 print(ans) print ans n,x = map(int, input().split()) map(int, input().split()) n temp = [] [] temp last = 0 0 last ans = 0 0 ans l = list(map(int, input().split())) list(map(int, input().split())) l x = map(int, input().split()) map(int, input().split()) x last += l[i] l[i] last ans += 1 1 ans
#k = int(input())
#s = input()
#a, b = map(int, input().split())
#s, t = map(str, input().split())
#l = list(map(int, input().split()))
#l = [list(map(int,input().split())) for i in range(n)]


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

temp = []

temp.append(0)
last = 0
for i in range(n):
    temp.append(last+l[i])
    last += l[i]
ans = 0
for i in range(n+1):
    if temp[i] <= x:
        ans += 1
print(ans)


