N,X = map(int,input().split())
l = list(map(int,input().split()))
p = 0
count = 1

for i in l:
    p += i
    count += 1
    if p > X:
        count -= 1
        break
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 p = 0 p 0 count = 1 count 1 for i in l:
    p += i
    count += 1
    if p > X:
        count -= 1
        break i l p += i p i count += 1 count 1 if p > X:
        count -= 1
        break p > X p X count -= 1 count 1 break print(count) print count p += i i p count -= 1 1 count X = map(int,input().split()) map(int,input().split()) X count += 1 1 count N,X = map(int,input().split()) map(int,input().split()) N l = list(map(int,input().split())) list(map(int,input().split())) l p = 0 0 p count = 1 1 count
N,X = map(int,input().split())
l = list(map(int,input().split()))
p = 0
count = 1

for i in l:
    p += i
    count += 1
    if p > X:
        count -= 1
        break
print(count)