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