N,X = map(int,input().split())
L = [int(i) for i in input().split()]
D = [0]

for i in range(N):
    a = D[i]+L[i]
    if(a <= X):
        D.append(a)
    else:
        break

print(len(D)) N,X = map(int,input().split()) N map(int,input().split()) map int input().split() ().split () input split X int(i) for i in input().split() for i in input().split() i input().split() ().split () input split for i in input().split() int(i) int i L = [int(i) for i in input().split()] L [int(i) for i in input().split()] D = [0] D [0] 0 for i in range(N):
    a = D[i]+L[i]
    if(a <= X):
        D.append(a)
    else:
        break i range(N) range N a = D[i]+L[i] a D[i]+L[i] D[i] D i L[i] L i if(a <= X):
        D.append(a)
    else:
        break a <= X a X D.append(a) D.append D append a break print(len(D)) print len(D) len D L = [int(i) for i in input().split()] [int(i) for i in input().split()] L N,X = map(int,input().split()) map(int,input().split()) N a = D[i]+L[i] D[i]+L[i] a X = map(int,input().split()) map(int,input().split()) X D = [0] [0] D
N,X = map(int,input().split())
L = [int(i) for i in input().split()]
D = [0]

for i in range(N):
    a = D[i]+L[i]
    if(a <= X):
        D.append(a)
    else:
        break

print(len(D))