import sys
N,X = map(int,input().split())
array = list(map(int,input().split()))

count = 1
point = 0
for I in range(len(array)):
    point += array[I]
    if point <= X:
        count += 1
    else:
        break
print(count) import sys sys N,X = map(int,input().split()) N map(int,input().split()) map int input().split() ().split () input split X array = list(map(int,input().split())) array list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split count = 1 count 1 point = 0 point 0 for I in range(len(array)):
    point += array[I]
    if point <= X:
        count += 1
    else:
        break I range(len(array)) range len(array) len array point += array[I] point array[I] array I if point <= X:
        count += 1
    else:
        break point <= X point X count += 1 count 1 break print(count) print count array = list(map(int,input().split())) list(map(int,input().split())) array X = map(int,input().split()) map(int,input().split()) X N,X = map(int,input().split()) map(int,input().split()) N count += 1 1 count point += array[I] array[I] point count = 1 1 count point = 0 0 point
import sys
N,X = map(int,input().split())
array = list(map(int,input().split()))

count = 1
point = 0
for I in range(len(array)):
    point += array[I]
    if point <= X:
        count += 1
    else:
        break
print(count)