n,x=list(map(int,input().split()))
l=list(map(int,input().split()))
from itertools import accumulate
l=[0]+list(accumulate(l))


from bisect import bisect_right
print(bisect_right(l,x)) 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 from itertools import accumulate l=[0]+list(accumulate(l)) l [0]+list(accumulate(l)) [0] 0 list(accumulate(l)) list accumulate(l) accumulate l from bisect import bisect_right print(bisect_right(l,x)) print bisect_right(l,x) bisect_right l x x=list(map(int,input().split())) list(map(int,input().split())) x l=[0]+list(accumulate(l)) [0]+list(accumulate(l)) l n,x=list(map(int,input().split())) list(map(int,input().split())) n l=list(map(int,input().split())) list(map(int,input().split())) l
n,x=list(map(int,input().split()))
l=list(map(int,input().split()))
from itertools import accumulate
l=[0]+list(accumulate(l))


from bisect import bisect_right
print(bisect_right(l,x))
