n,x =map(int, input().split())
l = list(map(int, input().split()))
d = [0]*(n+1)
for i in range(len(l)):
  d[i+1] = d[i]+l[i]
cnt=0
for i in d:
  if i <= x:
    cnt+=1
print(cnt) 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 d = [0]*(n+1) d [0]*(n+1) [0] 0 n+1 n 1 for i in range(len(l)):
  d[i+1] = d[i]+l[i] i range(len(l)) range len(l) len l 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 cnt=0 cnt 0 for i in d:
  if i <= x:
    cnt+=1 i d if i <= x:
    cnt+=1 i <= x i x cnt+=1 cnt 1 print(cnt) print cnt cnt=0 0 cnt cnt+=1 1 cnt n,x =map(int, input().split()) map(int, input().split()) n x =map(int, input().split()) map(int, input().split()) x l = list(map(int, input().split())) list(map(int, input().split())) l d = [0]*(n+1) [0]*(n+1) d
n,x =map(int, input().split())
l = list(map(int, input().split()))
d = [0]*(n+1)
for i in range(len(l)):
  d[i+1] = d[i]+l[i]
cnt=0
for i in d:
  if i <= x:
    cnt+=1
print(cnt)