n,x = map(int, raw_input().split(' '))
ais = map(int, raw_input().split(' '))
count,cur,i = 1,0, 0
res = []
while(i < len(ais)):
	cur += ais[i]
	if cur <= x:
		count+=1
	else:
		break

	i +=1
print count
#print len([e for e in res if e <= x]) n,x = map(int, raw_input().split(' ')) n map(int, raw_input().split(' ')) map int raw_input().split(' ') ().split () raw_input split ' ' x ais = map(int, raw_input().split(' ')) ais map(int, raw_input().split(' ')) map int raw_input().split(' ') ().split () raw_input split ' ' count,cur,i = 1,0, 0 count 1 cur 0 i 0 res = [] res [] while(i < len(ais)):
	cur += ais[i]
	if cur <= x:
		count+=1
	else:
		break

	i +=1 i < len(ais) i len(ais) len ais cur += ais[i] cur ais[i] ais i if cur <= x:
		count+=1
	else:
		break

	 cur <= x cur x count+=1 count 1 break i +=1 i 1 print res = [] [] res x = map(int, raw_input().split(' ')) map(int, raw_input().split(' ')) x i = 1,0, 0 0 i i +=1 1 i n,x = map(int, raw_input().split(' ')) map(int, raw_input().split(' ')) n cur += ais[i] ais[i] cur count+=1 1 count ais = map(int, raw_input().split(' ')) map(int, raw_input().split(' ')) ais cur,i = 1,0, 0 0 cur count,cur,i = 1,0, 0 1 count
n,x = map(int, raw_input().split(' '))
ais = map(int, raw_input().split(' '))
count,cur,i = 1,0, 0
res = []
while(i < len(ais)):
	cur += ais[i]
	if cur <= x:
		count+=1
	else:
		break

	i +=1
print count
#print len([e for e in res if e <= x])