n,x=map(int,input().split())
l=list(map(int,input().split()))
d=[0]

for i in range(1,n+1):
    temp=d[i-1]+l[i-1]
    if temp>x:
        ans=i
        break
    d.append(temp)

else:
    ans=n+1

print(ans) n,x=map(int,input().split()) n map(int,input().split()) map int input().split() ().split () input split x l=list(map(int,input().split())) l list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split d=[0] d [0] 0 for i in range(1,n+1):
    temp=d[i-1]+l[i-1]
    if temp>x:
        ans=i
        break
    d.append(temp)

else:
    ans=n+1 i range(1,n+1) range 1 n+1 n 1 temp=d[i-1]+l[i-1] temp d[i-1]+l[i-1] d[i-1] d i-1 i 1 l[i-1] l i-1 i 1 if temp>x:
        ans=i
        break
     temp>x temp x ans=i ans i break d.append(temp) d.append d append temp ans=n+1 ans n+1 n 1 print(ans) print ans n,x=map(int,input().split()) map(int,input().split()) n temp=d[i-1]+l[i-1] d[i-1]+l[i-1] temp d=[0] [0] d x=map(int,input().split()) map(int,input().split()) x l=list(map(int,input().split())) list(map(int,input().split())) l ans=i i ans ans=n+1 n+1 ans
n,x=map(int,input().split())
l=list(map(int,input().split()))
d=[0]

for i in range(1,n+1):
    temp=d[i-1]+l[i-1]
    if temp>x:
        ans=i
        break
    d.append(temp)

else:
    ans=n+1

print(ans)