n, x = list(map(int, input().split()))
# a = list(map(int, input().split()))
# data = [list(map(int, input().split())) for i in range(n)]
# k = int(input())
L = list(map(int, input().split()))
# ab_sorted = sorted(ab, key=lambda x: x[0])
#ab = [list(map(int, input().split())) for i in range(n)]
# print(min(15*n, 100*(n//10+1), 100*(n//10)+15*(n % 10)))
d = 0
count = 1
for l in L:
    if d+l > x:
        break
    else:
        d = d+l
        count += 1

print(count) n, x = list(map(int, input().split())) n list(map(int, input().split())) list 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 d = 0 d 0 count = 1 count 1 for l in L:
    if d+l > x:
        break
    else:
        d = d+l
        count += 1 l L if d+l > x:
        break
    else:
        d = d+l
        count += 1 d+l > x d+l d l x break d = d+l d d+l d l count += 1 count 1 print(count) print count count = 1 1 count d = d+l d+l d x = list(map(int, input().split())) list(map(int, input().split())) x L = list(map(int, input().split())) list(map(int, input().split())) L n, x = list(map(int, input().split())) list(map(int, input().split())) n count += 1 1 count d = 0 0 d
n, x = list(map(int, input().split()))
# a = list(map(int, input().split()))
# data = [list(map(int, input().split())) for i in range(n)]
# k = int(input())
L = list(map(int, input().split()))
# ab_sorted = sorted(ab, key=lambda x: x[0])
#ab = [list(map(int, input().split())) for i in range(n)]
# print(min(15*n, 100*(n//10+1), 100*(n//10)+15*(n % 10)))
d = 0
count = 1
for l in L:
    if d+l > x:
        break
    else:
        d = d+l
        count += 1

print(count)
