#!/usr/bin/env python3

import sys, math

input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')

sys.setrecursionlimit(10**8)

inf = float('inf')

ans=count=0





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

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

for li in l:

    count+=li

    if count<=k:

        ans+=1

print((ans+1))
#!/usr/bin/env python3

import sys, math, itertools, heapq, collections, bisect

input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')

sys.setrecursionlimit(10**8)

inf = float('inf')

ans = count = 0



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

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

for i in range(n):

    count+=L[i]

    if count<=x:

        ans+=1

print((ans+1))
#!/usr/bin/env python3
import sys, math

input = lambda: sys.stdin.buffer.readline().rstrip().decode("utf-8")
sys.setrecursionlimit(10**8)
inf = float("inf")
ans = count = 0
n, k = list(map(int, input().split()))
l = list(map(int, input().split()))
for li in l:
    count += li
    if count <= k:
        ans += 1
print((ans + 1))

#!/usr/bin/env python3
import sys, math, itertools, heapq, collections, bisect

input = lambda: sys.stdin.buffer.readline().rstrip().decode("utf-8")
sys.setrecursionlimit(10**8)
inf = float("inf")
ans = count = 0
n, x = list(map(int, input().split()))
L = list(map(int, input().split()))
for i in range(n):
    count += L[i]
    if count <= x:
        ans += 1
print((ans + 1))

-import sys, math +import sys, math, itertools, heapq, collections, bisect -n, k = list(map(int, input().split())) -l = list(map(int, input().split())) -for li in l: -    count += li -    if count <= k: +n, x = list(map(int, input().split())) +L = list(map(int, input().split())) +for i in range(n): +    count += L[i] +    if count <= x: