a,b=map(int,input().split())
arr=list(map(int,input().split()))
c=1
s=0
for i in range(a):
	s+=arr[i]
	if s<=b:
		c+=1
	else:
		break	
		
print(c)		 a,b=map(int,input().split()) a map(int,input().split()) map int input().split() ().split () input split b arr=list(map(int,input().split())) arr list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split c=1 c 1 s=0 s 0 for i in range(a):
	s+=arr[i]
	if s<=b:
		c+=1
	else:
		break	
		 i range(a) range a s+=arr[i] s arr[i] arr i if s<=b:
		c+=1
	else:
		break	
		 s<=b s b c+=1 c 1 break print(c) print c c+=1 1 c s=0 0 s b=map(int,input().split()) map(int,input().split()) b s+=arr[i] arr[i] s arr=list(map(int,input().split())) list(map(int,input().split())) arr c=1 1 c a,b=map(int,input().split()) map(int,input().split()) a
a,b=map(int,input().split())
arr=list(map(int,input().split()))
c=1
s=0
for i in range(a):
	s+=arr[i]
	if s<=b:
		c+=1
	else:
		break	
		
print(c)		