import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
def s(): return input()
def k(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def X(): return list(input())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
def gcd(*numbers): reduce(math.gcd, numbers)
sys.setrecursionlimit(10 ** 9)
mod = 10**9+7
count = 0
ans = 0

N, X = I()
L = [0] + l()
l = list(itertools.accumulate(L))

for i in l:
    if i <= X:
        count += 1

print(count) import sys sys import math math import itertools itertools import bisect bisect from copy import copy from collections import deque,Counter from decimal import Decimal def s(): return input() s def k(): return int(input()) k def S(): return input().split() S def I(): return map(int,input().split()) I def X(): return list(input()) X def L(): return list(input().split()) L def l(): return list(map(int,input().split())) l def lcm(a,b): return a*b//math.gcd(a,b) lcm a a b b def gcd(*numbers): reduce(math.gcd, numbers) gcd *numbers sys.setrecursionlimit(10 ** 9) sys.setrecursionlimit sys setrecursionlimit 10 ** 9 10 9 mod = 10**9+7 mod 10**9+7 10**9 10 9 7 count = 0 count 0 ans = 0 ans 0 N, X = I() N I() I X L = [0] + l() L [0] + l() [0] 0 l() l l = list(itertools.accumulate(L)) l list(itertools.accumulate(L)) list itertools.accumulate(L) itertools.accumulate itertools accumulate L for i in l:
    if i <= X:
        count += 1 i l if i <= X:
        count += 1 i <= X i X count += 1 count 1 print(count) print count def S(): return input().split() def S(): return input().split() S def l(): return list(map(int,input().split())) def l(): return list(map(int,input().split())) l mod = 10**9+7 10**9+7 mod def gcd(*numbers): reduce(math.gcd, numbers) def gcd(*numbers): reduce(math.gcd, numbers) gcd N, X = I() I() N def s(): return input() def s(): return input() s X = I() I() X count = 0 0 count count += 1 1 count def k(): return int(input()) def k(): return int(input()) k def lcm(a,b): return a*b//math.gcd(a,b) def lcm(a,b): return a*b//math.gcd(a,b) lcm def L(): return list(input().split()) def L(): return list(input().split()) L def I(): return map(int,input().split()) def I(): return map(int,input().split()) I def X(): return list(input()) def X(): return list(input()) X ans = 0 0 ans L = [0] + l() [0] + l() L l = list(itertools.accumulate(L)) list(itertools.accumulate(L)) l
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
def s(): return input()
def k(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def X(): return list(input())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
def gcd(*numbers): reduce(math.gcd, numbers)
sys.setrecursionlimit(10 ** 9)
mod = 10**9+7
count = 0
ans = 0

N, X = I()
L = [0] + l()
l = list(itertools.accumulate(L))

for i in l:
    if i <= X:
        count += 1

print(count)
