import bisect N, Q = list(map(int,input().split())) T = list(map(int,input().split())) S = [ T[i] for i in range(N)] for i in range(N - 1): S[i + 1] += S[i] for q in range(Q): X = int(input()) print(bisect.bisect(S, X))