def main():
    n, x = map(int, input().split())
    l_lst = list(map(int, input().split()))
    count = 0
    coordinate_lst = [0]

    for i in range(n):
        coordinate_lst.append(coordinate_lst[i] + l_lst[i])

    for i in range(n+1):
        if coordinate_lst[i] <= x:
            count += 1

    print(count)


if __name__ == '__main__':
    main() def main():
    n, x = map(int, input().split())
    l_lst = list(map(int, input().split()))
    count = 0
    coordinate_lst = [0]

    for i in range(n):
        coordinate_lst.append(coordinate_lst[i] + l_lst[i])

    for i in range(n+1):
        if coordinate_lst[i] <= x:
            count += 1

    print(count) main n, x = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split x l_lst = list(map(int, input().split())) l_lst list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split count = 0 count 0 coordinate_lst = [0] coordinate_lst [0] 0 for i in range(n):
        coordinate_lst.append(coordinate_lst[i] + l_lst[i])

     i range(n) range n coordinate_lst.append(coordinate_lst[i] + l_lst[i]) coordinate_lst.append coordinate_lst append coordinate_lst[i] + l_lst[i] coordinate_lst[i] coordinate_lst i l_lst[i] l_lst i for i in range(n+1):
        if coordinate_lst[i] <= x:
            count += 1

     i range(n+1) range n+1 n 1 if coordinate_lst[i] <= x:
            count += 1

     coordinate_lst[i] <= x coordinate_lst[i] coordinate_lst i x count += 1 count 1 print(count) print count if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main def main():
    n, x = map(int, input().split())
    l_lst = list(map(int, input().split()))
    count = 0
    coordinate_lst = [0]

    for i in range(n):
        coordinate_lst.append(coordinate_lst[i] + l_lst[i])

    for i in range(n+1):
        if coordinate_lst[i] <= x:
            count += 1

    print(count) def main():
    n, x = map(int, input().split())
    l_lst = list(map(int, input().split()))
    count = 0
    coordinate_lst = [0]

    for i in range(n):
        coordinate_lst.append(coordinate_lst[i] + l_lst[i])

    for i in range(n+1):
        if coordinate_lst[i] <= x:
            count += 1

    print(count) main
def main():
    n, x = map(int, input().split())
    l_lst = list(map(int, input().split()))
    count = 0
    coordinate_lst = [0]

    for i in range(n):
        coordinate_lst.append(coordinate_lst[i] + l_lst[i])

    for i in range(n+1):
        if coordinate_lst[i] <= x:
            count += 1

    print(count)


if __name__ == '__main__':
    main()