import sys

N, X = map(int, input().split())
L = input().split()
L = [int(i) for i in L]

d =0
count=1
for i in range(N):
    d = d+L[i]
    if d > X:
        print(count)
        sys.exit()
    count+=1
print(count) import sys sys N, X = map(int, input().split()) N map(int, input().split()) map int input().split() ().split () input split X L = input().split() L input().split() ().split () input split int(i) for i in L for i in L i L for i in L int(i) int i L = [int(i) for i in L] L [int(i) for i in L] d =0 d 0 count=1 count 1 for i in range(N):
    d = d+L[i]
    if d > X:
        print(count)
        sys.exit()
    count+=1 i range(N) range N d = d+L[i] d d+L[i] d L[i] L i if d > X:
        print(count)
        sys.exit()
     d > X d X print(count) print count sys.exit() sys.exit sys exit count+=1 count 1 print(count) print count d = d+L[i] d+L[i] d N, X = map(int, input().split()) map(int, input().split()) N L = input().split() input().split() L X = map(int, input().split()) map(int, input().split()) X count=1 1 count L = [int(i) for i in L] [int(i) for i in L] L count+=1 1 count d =0 0 d
import sys

N, X = map(int, input().split())
L = input().split()
L = [int(i) for i in L]

d =0
count=1
for i in range(N):
    d = d+L[i]
    if d > X:
        print(count)
        sys.exit()
    count+=1
print(count)
