import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7

_, x = rm()
li = rl()
cnt = 0
d = 0
for i in li:
  d += i
  if d <= x:
    cnt += 1
print(cnt + 1)




 import sys sys import math math import itertools itertools import collections collections import heapq heapq import re re import numpy as np numpy rr = lambda: sys.stdin.readline().rstrip() rr lambda: sys.stdin.readline().rstrip() sys.stdin.readline().rstrip() sys.stdin.readline().rstrip sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline rstrip rs = lambda: sys.stdin.readline().split() rs lambda: sys.stdin.readline().split() sys.stdin.readline().split() sys.stdin.readline().split sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline split ri = lambda: int(sys.stdin.readline()) ri lambda: int(sys.stdin.readline()) int(sys.stdin.readline()) int sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline rm = lambda: map(int, sys.stdin.readline().split()) rm lambda: map(int, sys.stdin.readline().split()) map(int, sys.stdin.readline().split()) map int sys.stdin.readline().split() sys.stdin.readline().split sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline split rl = lambda: list(map(int, sys.stdin.readline().split())) rl lambda: list(map(int, sys.stdin.readline().split())) list(map(int, sys.stdin.readline().split())) list map(int, sys.stdin.readline().split()) map int sys.stdin.readline().split() sys.stdin.readline().split sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline split inf = float('inf') inf float('inf') float 'inf' mod = 10**9 + 7 mod 10**9 + 7 10**9 10 9 7 _, x = rm() _ rm() rm x li = rl() li rl() rl cnt = 0 cnt 0 d = 0 d 0 for i in li:
  d += i
  if d <= x:
    cnt += 1 i li d += i d i if d <= x:
    cnt += 1 d <= x d x cnt += 1 cnt 1 print(cnt + 1) print cnt + 1 cnt 1 rr = lambda: sys.stdin.readline().rstrip() lambda: sys.stdin.readline().rstrip() rr mod = 10**9 + 7 10**9 + 7 mod x = rm() rm() x cnt += 1 1 cnt d += i i d rs = lambda: sys.stdin.readline().split() lambda: sys.stdin.readline().split() rs ri = lambda: int(sys.stdin.readline()) lambda: int(sys.stdin.readline()) ri cnt = 0 0 cnt inf = float('inf') float('inf') inf d = 0 0 d rm = lambda: map(int, sys.stdin.readline().split()) lambda: map(int, sys.stdin.readline().split()) rm rl = lambda: list(map(int, sys.stdin.readline().split())) lambda: list(map(int, sys.stdin.readline().split())) rl _, x = rm() rm() _ li = rl() rl() li
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7

_, x = rm()
li = rl()
cnt = 0
d = 0
for i in li:
  d += i
  if d <= x:
    cnt += 1
print(cnt + 1)





