N,X = map(int,input().split())
L = list(map(int,input().split()))

curCoord = 0
n = 1

while (curCoord<=X):
    n = n+1
    
    if (n>N+1):
        break
    else:
        curCoord = curCoord+L[n-2]

print(n-1) 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 curCoord = 0 curCoord 0 n = 1 n 1 while (curCoord<=X):
    n = n+1
    
    if (n>N+1):
        break
    else:
        curCoord = curCoord+L[n-2] curCoord<=X curCoord X n = n+1 n n+1 n 1 if (n>N+1):
        break
    else:
        curCoord = curCoord+L[n-2] n>N+1 n N+1 N 1 break curCoord = curCoord+L[n-2] curCoord curCoord+L[n-2] curCoord L[n-2] L n-2 n 2 print(n-1) print n-1 n 1 n = n+1 n+1 n curCoord = 0 0 curCoord n = 1 1 n X = map(int,input().split()) map(int,input().split()) X curCoord = curCoord+L[n-2] curCoord+L[n-2] curCoord L = list(map(int,input().split())) list(map(int,input().split())) L N,X = map(int,input().split()) map(int,input().split()) N
N,X = map(int,input().split())
L = list(map(int,input().split()))

curCoord = 0
n = 1

while (curCoord<=X):
    n = n+1
    
    if (n>N+1):
        break
    else:
        curCoord = curCoord+L[n-2]

print(n-1)