n, x = map(int, input().split())
data = [0] + list(map(int, input().split()))
count = 0
tmp = 0
for d in data:
    tmp += d
    if tmp <= x:
        count += 1
    # print(tmp)

print(count) n, x = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split x data = [0] + list(map(int, input().split())) data [0] + list(map(int, input().split())) [0] 0 list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split count = 0 count 0 tmp = 0 tmp 0 for d in data:
    tmp += d
    if tmp <= x:
        count += 1
    # print(tmp) d data tmp += d tmp d if tmp <= x:
        count += 1
    # print(tmp) tmp <= x tmp x count += 1 count 1 print(count) print count count = 0 0 count tmp = 0 0 tmp n, x = map(int, input().split()) map(int, input().split()) n data = [0] + list(map(int, input().split())) [0] + list(map(int, input().split())) data x = map(int, input().split()) map(int, input().split()) x tmp += d d tmp count += 1 1 count
n, x = map(int, input().split())
data = [0] + list(map(int, input().split()))
count = 0
tmp = 0
for d in data:
    tmp += d
    if tmp <= x:
        count += 1
    # print(tmp)

print(count)