import itertools
import bisect

n, x = map(int, input().split())
l = list(map(int, input().split()))

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

n, x = map(int, input().split())
l = list(map(int, input().split()))

a = list(itertools.accumulate(l, initial=0))
print(bisect.bisect_right(a, x))