n, x = map(int, input().split())
a = list(map(int, input().split()))
l = [0] * (n+1)
for i in range(n):
  l[i+1] = l[i] + a[i]
ans = 0
for i in l:
  if i <= x:
    ans += 1
print(ans) n, x = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split x a = list(map(int, input().split())) a list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split l = [0] * (n+1) l [0] * (n+1) [0] 0 n+1 n 1 for i in range(n):
  l[i+1] = l[i] + a[i] i range(n) range n l[i+1] = l[i] + a[i] l[i+1] l i+1 i 1 l[i] + a[i] l[i] l i a[i] a i ans = 0 ans 0 for i in l:
  if i <= x:
    ans += 1 i l if i <= x:
    ans += 1 i <= x i x ans += 1 ans 1 print(ans) print ans x = map(int, input().split()) map(int, input().split()) x n, x = map(int, input().split()) map(int, input().split()) n ans += 1 1 ans ans = 0 0 ans a = list(map(int, input().split())) list(map(int, input().split())) a l = [0] * (n+1) [0] * (n+1) l
n, x = map(int, input().split())
a = list(map(int, input().split()))
l = [0] * (n+1)
for i in range(n):
  l[i+1] = l[i] + a[i]
ans = 0
for i in l:
  if i <= x:
    ans += 1
print(ans)