n, x = (int(i) for i in input().split())
list_l = [int(j) for j in input().split()]
tmp = 0
count = 0
for i in range(0, n + 1):
    if i == 0:
        pass
    else:
        tmp += list_l[i - 1]
        if tmp > x:
            break
    count += 1
print(count) 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 n, x = (int(i) for i in input().split()) n (int(i) for i in input().split()) x int(j) for j in input().split() for j in input().split() j input().split() ().split () input split for j in input().split() int(j) int j list_l = [int(j) for j in input().split()] list_l [int(j) for j in input().split()] tmp = 0 tmp 0 count = 0 count 0 for i in range(0, n + 1):
    if i == 0:
        pass
    else:
        tmp += list_l[i - 1]
        if tmp > x:
            break
    count += 1 i range(0, n + 1) range 0 n + 1 n 1 if i == 0:
        pass
    else:
        tmp += list_l[i - 1]
        if tmp > x:
            break
     i == 0 i 0 tmp += list_l[i - 1] tmp list_l[i - 1] list_l i - 1 i 1 if tmp > x:
            break
     tmp > x tmp x break count += 1 count 1 print(count) print count x = (int(i) for i in input().split()) (int(i) for i in input().split()) x count += 1 1 count list_l = [int(j) for j in input().split()] [int(j) for j in input().split()] list_l count = 0 0 count tmp = 0 0 tmp tmp += list_l[i - 1] list_l[i - 1] tmp n, x = (int(i) for i in input().split()) (int(i) for i in input().split()) n
n, x = (int(i) for i in input().split())
list_l = [int(j) for j in input().split()]
tmp = 0
count = 0
for i in range(0, n + 1):
    if i == 0:
        pass
    else:
        tmp += list_l[i - 1]
        if tmp > x:
            break
    count += 1
print(count)