def main():
    N, X = map(int, input().split())
    A = list(map(int, input().split()))
    cnt = 0
    D = 0
    bounds = [D]
    for a in A:
        D += a
        bounds.append(D)

    for b in bounds:
        if b <= X:
            cnt += 1
    print(cnt)


if __name__ == '__main__':
    main() def main():
    N, X = map(int, input().split())
    A = list(map(int, input().split()))
    cnt = 0
    D = 0
    bounds = [D]
    for a in A:
        D += a
        bounds.append(D)

    for b in bounds:
        if b <= X:
            cnt += 1
    print(cnt) main N, X = map(int, input().split()) N map(int, input().split()) map int input().split() ().split () input split X A = list(map(int, input().split())) A list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split cnt = 0 cnt 0 D = 0 D 0 bounds = [D] bounds [D] D for a in A:
        D += a
        bounds.append(D)

     a A D += a D a bounds.append(D) bounds.append bounds append D for b in bounds:
        if b <= X:
            cnt += 1
     b bounds if b <= X:
            cnt += 1
     b <= X b X cnt += 1 cnt 1 print(cnt) print cnt if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main def main():
    N, X = map(int, input().split())
    A = list(map(int, input().split()))
    cnt = 0
    D = 0
    bounds = [D]
    for a in A:
        D += a
        bounds.append(D)

    for b in bounds:
        if b <= X:
            cnt += 1
    print(cnt) def main():
    N, X = map(int, input().split())
    A = list(map(int, input().split()))
    cnt = 0
    D = 0
    bounds = [D]
    for a in A:
        D += a
        bounds.append(D)

    for b in bounds:
        if b <= X:
            cnt += 1
    print(cnt) main
def main():
    N, X = map(int, input().split())
    A = list(map(int, input().split()))
    cnt = 0
    D = 0
    bounds = [D]
    for a in A:
        D += a
        bounds.append(D)

    for b in bounds:
        if b <= X:
            cnt += 1
    print(cnt)


if __name__ == '__main__':
    main()
