N, X = map(int,input().split())
lst = list(map(int,input().split()))

cnt = 1
now = 0
for i in range(N):
    l = now + lst[i]
    if l > X:
        break
    else:
        cnt += 1
        now = l
    

print(cnt) N, X = map(int,input().split()) N map(int,input().split()) map int input().split() ().split () input split X lst = list(map(int,input().split())) lst list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split cnt = 1 cnt 1 now = 0 now 0 for i in range(N):
    l = now + lst[i]
    if l > X:
        break
    else:
        cnt += 1
        now = l
     i range(N) range N l = now + lst[i] l now + lst[i] now lst[i] lst i if l > X:
        break
    else:
        cnt += 1
        now = l
     l > X l X break cnt += 1 cnt 1 now = l now l print(cnt) print cnt l = now + lst[i] now + lst[i] l lst = list(map(int,input().split())) list(map(int,input().split())) lst cnt = 1 1 cnt cnt += 1 1 cnt now = l l now X = map(int,input().split()) map(int,input().split()) X now = 0 0 now N, X = map(int,input().split()) map(int,input().split()) N
N, X = map(int,input().split())
lst = list(map(int,input().split()))

cnt = 1
now = 0
for i in range(N):
    l = now + lst[i]
    if l > X:
        break
    else:
        cnt += 1
        now = l
    

print(cnt)