N, X = map(int, input().split())
l = list(map(int, input().split()))
l.insert(0, 0)
val, count = 0, 0
for i in l:
    val += i
    if val <= X:
        count += 1
    else:
        break
print(count) 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 l.insert(0, 0) l.insert l insert 0 0 val, count = 0, 0 val 0 count 0 for i in l:
    val += i
    if val <= X:
        count += 1
    else:
        break i l val += i val i if val <= X:
        count += 1
    else:
        break val <= X val X count += 1 count 1 break print(count) print count count = 0, 0 0 count val += i i val 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 count += 1 1 count val, count = 0, 0 0 val
N, X = map(int, input().split())
l = list(map(int, input().split()))
l.insert(0, 0)
val, count = 0, 0
for i in l:
    val += i
    if val <= X:
        count += 1
    else:
        break
print(count)
