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