import sys

N, X = map(int, input().split())
L = list(map(int, sys.stdin.readline().rsplit()))

d = 0
res = 1
for l in L:
    if d + l > X:
        break
    d += l
    res += 1

print(res) import sys sys N, X = map(int, input().split()) N map(int, input().split()) map int input().split() ().split () input split X L = list(map(int, sys.stdin.readline().rsplit())) L list(map(int, sys.stdin.readline().rsplit())) list map(int, sys.stdin.readline().rsplit()) map int sys.stdin.readline().rsplit() sys.stdin.readline().rsplit sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline rsplit d = 0 d 0 res = 1 res 1 for l in L:
    if d + l > X:
        break
    d += l
    res += 1 l L if d + l > X:
        break
     d + l > X d + l d l X break d += l d l res += 1 res 1 print(res) print res d += l l d res += 1 1 res X = map(int, input().split()) map(int, input().split()) X N, X = map(int, input().split()) map(int, input().split()) N L = list(map(int, sys.stdin.readline().rsplit())) list(map(int, sys.stdin.readline().rsplit())) L res = 1 1 res d = 0 0 d
import sys

N, X = map(int, input().split())
L = list(map(int, sys.stdin.readline().rsplit()))

d = 0
res = 1
for l in L:
    if d + l > X:
        break
    d += l
    res += 1

print(res)
