def main():
    n, x = map(int, input().split())
    inlis = list(map(int, input().split()))
    ans = 1
    tmp = 0

    for i in range(n):
        tmp += inlis[i]
        if tmp <= x:
            ans += 1
        else:
            break
    print(ans)

    
if __name__ == "__main__":
    main() def main():
    n, x = map(int, input().split())
    inlis = list(map(int, input().split()))
    ans = 1
    tmp = 0

    for i in range(n):
        tmp += inlis[i]
        if tmp <= x:
            ans += 1
        else:
            break
    print(ans)

     main n, x = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split x inlis = list(map(int, input().split())) inlis list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split ans = 1 ans 1 tmp = 0 tmp 0 for i in range(n):
        tmp += inlis[i]
        if tmp <= x:
            ans += 1
        else:
            break
     i range(n) range n tmp += inlis[i] tmp inlis[i] inlis i if tmp <= x:
            ans += 1
        else:
            break
     tmp <= x tmp x ans += 1 ans 1 break print(ans) print ans if __name__ == "__main__":
    main() __name__ == "__main__" __name__ "__main__" main() main def main():
    n, x = map(int, input().split())
    inlis = list(map(int, input().split()))
    ans = 1
    tmp = 0

    for i in range(n):
        tmp += inlis[i]
        if tmp <= x:
            ans += 1
        else:
            break
    print(ans)

     def main():
    n, x = map(int, input().split())
    inlis = list(map(int, input().split()))
    ans = 1
    tmp = 0

    for i in range(n):
        tmp += inlis[i]
        if tmp <= x:
            ans += 1
        else:
            break
    print(ans)

     main
def main():
    n, x = map(int, input().split())
    inlis = list(map(int, input().split()))
    ans = 1
    tmp = 0

    for i in range(n):
        tmp += inlis[i]
        if tmp <= x:
            ans += 1
        else:
            break
    print(ans)

    
if __name__ == "__main__":
    main()
