from itertools import accumulate

n, x = map(int, input().split())
l = list(map(int, input().split()))
d = [0] + list(accumulate(l))
print(len([1 for e in d if e <= x])) from itertools import accumulate 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 d = [0] + list(accumulate(l)) d [0] + list(accumulate(l)) [0] 0 list(accumulate(l)) list accumulate(l) accumulate l 1 for e in d if e <= x for e in d if e <= x e d e <= x e x if e <= x 1 print(len([1 for e in d if e <= x])) print len([1 for e in d if e <= x]) len [1 for e in d if e <= x] d = [0] + list(accumulate(l)) [0] + list(accumulate(l)) d l = list(map(int, input().split())) list(map(int, input().split())) l n, x = map(int, input().split()) map(int, input().split()) n x = map(int, input().split()) map(int, input().split()) x
from itertools import accumulate

n, x = map(int, input().split())
l = list(map(int, input().split()))
d = [0] + list(accumulate(l))
print(len([1 for e in d if e <= x]))
