import itertools
N,X=map(int,input().split())
L=[int(x) for x in input().split()]
ans=sum(x<=X for x in itertools.accumulate([0]+L))
print(ans) import itertools itertools N,X=map(int,input().split()) N map(int,input().split()) map int input().split() ().split () input split X int(x) for x in input().split() for x in input().split() x input().split() ().split () input split for x in input().split() int(x) int x L=[int(x) for x in input().split()] L [int(x) for x in input().split()] ans=sum(x<=X for x in itertools.accumulate([0]+L)) ans sum(x<=X for x in itertools.accumulate([0]+L)) sum x<=X x X print(ans) print ans N,X=map(int,input().split()) map(int,input().split()) N X=map(int,input().split()) map(int,input().split()) X L=[int(x) for x in input().split()] [int(x) for x in input().split()] L ans=sum(x<=X for x in itertools.accumulate([0]+L)) sum(x<=X for x in itertools.accumulate([0]+L)) ans
import itertools
N,X=map(int,input().split())
L=[int(x) for x in input().split()]
ans=sum(x<=X for x in itertools.accumulate([0]+L))
print(ans)
