import itertools
import bisect

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

dl = [0] + list(itertools.accumulate(ll))

print(bisect.bisect_right(dl, 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 ll = list(map(int, input().split())) ll list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split dl = [0] + list(itertools.accumulate(ll)) dl [0] + list(itertools.accumulate(ll)) [0] 0 list(itertools.accumulate(ll)) list itertools.accumulate(ll) itertools.accumulate itertools accumulate ll print(bisect.bisect_right(dl, x)) print bisect.bisect_right(dl, x) bisect.bisect_right bisect bisect_right dl x dl = [0] + list(itertools.accumulate(ll)) [0] + list(itertools.accumulate(ll)) dl x = map(int, input().split()) map(int, input().split()) x n, x = map(int, input().split()) map(int, input().split()) n ll = list(map(int, input().split())) list(map(int, input().split())) ll
import itertools
import bisect

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

dl = [0] + list(itertools.accumulate(ll))

print(bisect.bisect_right(dl, x))