import bisect

N, X = map(int, input().split())
L = list(map(int, input().split()))

D = [0]
for i in range(len(L)):
    D.append(sum(L[:i+1]))
print(bisect.bisect_right(D, X)) import bisect bisect 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 D = [0] D [0] 0 for i in range(len(L)):
    D.append(sum(L[:i+1])) i range(len(L)) range len(L) len L D.append(sum(L[:i+1])) D.append D append sum(L[:i+1]) sum L[:i+1] L :i+1 i+1 i 1 print(bisect.bisect_right(D, X)) print bisect.bisect_right(D, X) bisect.bisect_right bisect bisect_right D X L = list(map(int, input().split())) list(map(int, input().split())) L N, X = map(int, input().split()) map(int, input().split()) N D = [0] [0] D X = map(int, input().split()) map(int, input().split()) X
import bisect

N, X = map(int, input().split())
L = list(map(int, input().split()))

D = [0]
for i in range(len(L)):
    D.append(sum(L[:i+1]))
print(bisect.bisect_right(D, X))
