n, X = map(int, input().split())
l = list(map(int, input().split()))

sumList = [0]
for i in range(n):
    s = sumList[i]+l[i]
    if s > X:
        break
    sumList.append(s)

print(len(sumList)) 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 sumList = [0] sumList [0] 0 for i in range(n):
    s = sumList[i]+l[i]
    if s > X:
        break
    sumList.append(s) i range(n) range n s = sumList[i]+l[i] s sumList[i]+l[i] sumList[i] sumList i l[i] l i if s > X:
        break
     s > X s X break sumList.append(s) sumList.append sumList append s print(len(sumList)) print len(sumList) len sumList X = map(int, input().split()) map(int, input().split()) X sumList = [0] [0] sumList s = sumList[i]+l[i] sumList[i]+l[i] s n, X = map(int, input().split()) map(int, input().split()) n l = list(map(int, input().split())) list(map(int, input().split())) l
n, X = map(int, input().split())
l = list(map(int, input().split()))

sumList = [0]
for i in range(n):
    s = sumList[i]+l[i]
    if s > X:
        break
    sumList.append(s)

print(len(sumList))