# 初期入力
import sys
input = sys.stdin.readline
N,X = (int(x) for x in input().split())
L = list(map(int, input().split()))
d =[0]*(N+1)
count =1
for i in range(N):
    d[i+1] =d[i] +L[i]
    if d[i+1] <= X:
        count +=1
    else:
        break
print(count) import sys sys input = sys.stdin.readline input sys.stdin.readline sys.stdin sys stdin readline int(x) for x in input().split() for x in input().split() x input().split() ().split () input split for x in input().split() int(x) int x N,X = (int(x) for x in input().split()) N (int(x) for x in 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 d =[0]*(N+1) d [0]*(N+1) [0] 0 N+1 N 1 count =1 count 1 for i in range(N):
    d[i+1] =d[i] +L[i]
    if d[i+1] <= X:
        count +=1
    else:
        break i range(N) range N d[i+1] =d[i] +L[i] d[i+1] d i+1 i 1 d[i] +L[i] d[i] d i L[i] L i if d[i+1] <= X:
        count +=1
    else:
        break d[i+1] <= X d[i+1] d i+1 i 1 X count +=1 count 1 break print(count) print count N,X = (int(x) for x in input().split()) (int(x) for x in input().split()) N d =[0]*(N+1) [0]*(N+1) d L = list(map(int, input().split())) list(map(int, input().split())) L count +=1 1 count X = (int(x) for x in input().split()) (int(x) for x in input().split()) X count =1 1 count input = sys.stdin.readline sys.stdin.readline input
# 初期入力
import sys
input = sys.stdin.readline
N,X = (int(x) for x in input().split())
L = list(map(int, input().split()))
d =[0]*(N+1)
count =1
for i in range(N):
    d[i+1] =d[i] +L[i]
    if d[i+1] <= X:
        count +=1
    else:
        break
print(count)