import sys input = sys.stdin.readline from bisect import bisect N,Q=list(map(int,input().split())) T=list(map(int,input().split())) C=[T[0]] for x in T[1:]: C.append(C[-1]+x) for tests in range(Q): x=int(input()) ANS=bisect(C,x) print(ANS)