n, x = map(int, input().split())
l = input().split()
for i in range(n):
    l[i] = int(l[i])

cnt = 1
sum = 0
for i in range(n):
    sum += l[i]
    if sum > x:
        break
    cnt += 1
    
print(cnt) n, x = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split x l = input().split() l input().split() ().split () input split for i in range(n):
    l[i] = int(l[i]) i range(n) range n l[i] = int(l[i]) l[i] l i int(l[i]) int l[i] l i cnt = 1 cnt 1 sum = 0 sum 0 for i in range(n):
    sum += l[i]
    if sum > x:
        break
    cnt += 1
     i range(n) range n sum += l[i] sum l[i] l i if sum > x:
        break
     sum > x sum x break cnt += 1 cnt 1 print(cnt) print cnt l = input().split() input().split() l cnt = 1 1 cnt sum += l[i] l[i] sum x = map(int, input().split()) map(int, input().split()) x sum = 0 0 sum n, x = map(int, input().split()) map(int, input().split()) n cnt += 1 1 cnt
n, x = map(int, input().split())
l = input().split()
for i in range(n):
    l[i] = int(l[i])

cnt = 1
sum = 0
for i in range(n):
    sum += l[i]
    if sum > x:
        break
    cnt += 1
    
print(cnt)
