
n,x = map(int, input().split())
a = list(map(int, input().split()))
cnt = 1
total = 0

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

n,x = map(int, input().split())
a = list(map(int, input().split()))
cnt = 1
total = 0

for i in range(n):
    total += a[i]
    if total <= x:
        cnt += 1
print(cnt)
