N,X=list(map(int, input().split()))
L=list(map(int, input().split()))
c=1
x=0
for i in range(N):
  x+=L[i]
  if x<=X:
    c+=1
print(c) N,X=list(map(int, input().split())) N list(map(int, input().split())) list 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 c=1 c 1 x=0 x 0 for i in range(N):
  x+=L[i]
  if x<=X:
    c+=1 i range(N) range N x+=L[i] x L[i] L i if x<=X:
    c+=1 x<=X x X c+=1 c 1 print(c) print c x+=L[i] L[i] x N,X=list(map(int, input().split())) list(map(int, input().split())) N x=0 0 x c=1 1 c L=list(map(int, input().split())) list(map(int, input().split())) L c+=1 1 c X=list(map(int, input().split())) list(map(int, input().split())) X
N,X=list(map(int, input().split()))
L=list(map(int, input().split()))
c=1
x=0
for i in range(N):
  x+=L[i]
  if x<=X:
    c+=1
print(c)
