#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# 問題：https://atcoder.jp/contests/abc126/tasks/abc130_b

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

d = 0
i = 0
while i < n:
    d += l[i]
    if d > x:
        break
    i += 1

print(i+1) n, x = map(int, input().strip().split()) n map(int, input().strip().split()) map int input().strip().split() ().strip().split ().strip() ().strip () input strip split x l = list(map(int, input().strip().split())) l list(map(int, input().strip().split())) list map(int, input().strip().split()) map int input().strip().split() ().strip().split ().strip() ().strip () input strip split d = 0 d 0 i = 0 i 0 while i < n:
    d += l[i]
    if d > x:
        break
    i += 1 i < n i n d += l[i] d l[i] l i if d > x:
        break
     d > x d x break i += 1 i 1 print(i+1) print i+1 i 1 n, x = map(int, input().strip().split()) map(int, input().strip().split()) n x = map(int, input().strip().split()) map(int, input().strip().split()) x l = list(map(int, input().strip().split())) list(map(int, input().strip().split())) l d = 0 0 d i += 1 1 i i = 0 0 i d += l[i] l[i] d
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# 問題：https://atcoder.jp/contests/abc126/tasks/abc130_b

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

d = 0
i = 0
while i < n:
    d += l[i]
    if d > x:
        break
    i += 1

print(i+1)
