n, T = map(int, input().split())
lst = list(map(int, input().split()))
print(next((i for i in range(n) if sum(lst[:i+1]) > T), n))
n, T = map(int, input().split())
lst = list(map(int, input().split()))
print(next((i for i in range(n) if sum(lst[:i+1]) > T), n))