import sys

import numpy as np
from collections import deque
from collections import Counter
from itertools import accumulate
from itertools import permutations, combinations
from bisect import bisect_left, bisect_right
from heapq import heappop, heappush
from math import ceil, floor, sqrt
### ceil切り上げ，floor切り下げ

def main():
	n, x = map(int, input().split())
	lst = list(map(int, input().split()))
	d = 0
	ans = 1
	for l in lst:
		d += l
		if d <= x:
			ans += 1
		else:
			break
	print(ans)


if __name__ == '__main__':
	main() import sys sys import numpy as np numpy from collections import deque from collections import Counter from itertools import accumulate from itertools import permutations, combinations from bisect import bisect_left, bisect_right from heapq import heappop, heappush from math import ceil, floor, sqrt def main():
	n, x = map(int, input().split())
	lst = list(map(int, input().split()))
	d = 0
	ans = 1
	for l in lst:
		d += l
		if d <= x:
			ans += 1
		else:
			break
	print(ans) main n, x = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split x lst = list(map(int, input().split())) lst list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split d = 0 d 0 ans = 1 ans 1 for l in lst:
		d += l
		if d <= x:
			ans += 1
		else:
			break
	 l lst d += l d l if d <= x:
			ans += 1
		else:
			break
	 d <= x d x ans += 1 ans 1 break print(ans) print ans if __name__ == '__main__':
	main() __name__ == '__main__' __name__ '__main__' main() main def main():
	n, x = map(int, input().split())
	lst = list(map(int, input().split()))
	d = 0
	ans = 1
	for l in lst:
		d += l
		if d <= x:
			ans += 1
		else:
			break
	print(ans) def main():
	n, x = map(int, input().split())
	lst = list(map(int, input().split()))
	d = 0
	ans = 1
	for l in lst:
		d += l
		if d <= x:
			ans += 1
		else:
			break
	print(ans) main
import sys

import numpy as np
from collections import deque
from collections import Counter
from itertools import accumulate
from itertools import permutations, combinations
from bisect import bisect_left, bisect_right
from heapq import heappop, heappush
from math import ceil, floor, sqrt
### ceil切り上げ，floor切り下げ

def main():
	n, x = map(int, input().split())
	lst = list(map(int, input().split()))
	d = 0
	ans = 1
	for l in lst:
		d += l
		if d <= x:
			ans += 1
		else:
			break
	print(ans)


if __name__ == '__main__':
	main()