It is lunch time for Mole. His friend, Marmot, prepared him a nice game for lunch.

Marmot brought Mole n ordered piles of worms such that i-th pile contains a_{i} worms. He labeled all these worms with consecutive integers: worms in first pile are labeled with numbers 1 to a_1, worms in second pile are labeled with numbers a_1 + 1 to a_1 + a_2 and so on. See the example for a better understanding.

Mole can't eat all the worms (Marmot brought a lot) and, as we all know, Mole is blind, so Marmot tells him the labels of the best juicy worms. Marmot will only give Mole a worm if Mole says correctly in which pile this worm is contained.

Poor Mole asks for your help. For all juicy worms said by Marmot, tell Mole the correct answers.


-----Input-----

The first line contains a single integer n (1 ≤ n ≤ 10^5), the number of piles.

The second line contains n integers a_1, a_2, ..., a_{n} (1 ≤ a_{i} ≤ 10^3, a_1 + a_2 + ... + a_{n} ≤ 10^6), where a_{i} is the number of worms in the i-th pile.

The third line contains single integer m (1 ≤ m ≤ 10^5), the number of juicy worms said by Marmot.

The fourth line contains m integers q_1, q_2, ..., q_{m} (1 ≤ q_{i} ≤ a_1 + a_2 + ... + a_{n}), the labels of the juicy worms.


-----Output-----

Print m lines to the standard output. The i-th line should contain an integer, representing the number of the pile where the worm labeled with the number q_{i} is.


-----Examples-----
Input
5
2 7 3 4 9
3
1 25 11

Output
1
5
3



-----Note-----

For the sample input:

  The worms with labels from [1, 2] are in the first pile.  The worms with labels from [3, 9] are in the second pile.  The worms with labels from [10, 12] are in the third pile.  The worms with labels from [13, 16] are in the fourth pile.  The worms with labels from [17, 25] are in the fifth pile.

Starter code:

Solutions:
n=int(input())
a=list(map(int,input().split()))
k=[]
for i in range(n):
    for j in range(a[i]):
        k.append(i+1)
m=int(input())
b=list(map(int,input().split()))
for i in b:
    print(k[i-1])

n, p, m, w = int(input()), list(map(int, input().split())), int(input()), sorted(enumerate(map(int, input().split())), key = lambda x: x[1])
ans, pos = [-1] * m, [0, 0]
for i, c in w:
    while pos[0] + p[pos[1]] < c:
        pos[0] += p[pos[1]]
        pos[1] += 1
    ans[i] = pos[1] + 1
print(*ans, sep = '\n')


from sys import stdin, stdout
from bisect import *
input = stdin.read()
n, ai_str, m, qi_str = [_f for _f in input.split('\n') if _f]

a = list(map(int, ai_str.split()))
q = list(map(int, qi_str.split()))
assert len(a) > 0 and len(q) > 0

b = [0] * len(a)
for i, ai in enumerate(a):
	b[i] = b[i-1] + ai


for qi in q:
	print(bisect_left(b, qi) + 1)





input()
heaps = list(map(int, input().split()))
input()
numbers = list(map(int, input().split()))
#heaps = [2, 7, 3, 4, 9]
#numbers = [1, 25, 11]
res = [0] * len(numbers)

sums = [heaps[0]]
mask = [1] * heaps[0]
for i in range(1, len(heaps)):
    mask += [i+1] * (heaps[i])
    sums.append(heaps[i] + sums[-1])

for i in range(len(numbers)):
    print(mask[numbers[i]-1])



num = int(input())
piles = list(map(int, input().split(' ')))
tuplex = []
curr = 1
for i in piles:
    tuplex.append((curr, curr+i-1))
    curr = curr+i

quer = int(input())
queries = list(map(int, input().split(' ')))
quer2 = [[queries[x], x, -1] for x in range(len(queries))]
quer2.sort(key = lambda x:x[0])

ind = 0
for i in range(len(quer2)):
    while not (tuplex[ind][0] <= quer2[i][0] <= tuplex[ind][1]):
        ind += 1
    quer2[i][2] = ind

quer2.sort(key = lambda x:x[1])
for i in quer2:
    print(i[2]+1)

kheap=int(input())
heaps=list(map(int,input().split()))
kworms=int(input())
worms=list(map(int,input().split()))
d1={i:0 for i in range(1,sum(heaps)+1)}
prev=0
counter=1
for i in heaps:
    start=prev+1
    prev+=i
    for i2 in range(start,prev+1):
        d1[i2]=counter
    counter+=1
for num in worms:
    print(d1[num])

'''
Created on Oct 6, 2014

@author: Ismael
'''
n = int(input())
A = list(map(int,input().split()))
q = int(input())
Q = list(map(int,input().split()))
ans = []
prec = 1
iStack = 0
for ai in A:
    iStack += 1
    for query in range(prec,prec+ai):
        ans.append(iStack)
    prec = ai
for query in Q:
    print(ans[query-1])


#class heap:
	#def __init__(self, first, last):
		#self.first = first
		#self.last = last
	#def __contains__(self, x):
		#if self.first <= x <= self.last:
			#return True
		#else:
			#return False
		
def borders(nums):
	prev = 1
	for x in nums:
		yield prev, prev + x - 1
		prev += x

def inside(x, first, last):
	return first <= x <= last

#nums = list(int(x) for x in '2 7 3 4 9'.split(" "))
#print(nums)
#print(list(borders(nums)))

#j = list(int(x) for x in '1 25 11'.split(" "))




heapsamount = int(input())
nums = list(int(x) for x in input().split(" "))
jamount = int(input())
j = list(int(x) for x in input().split(" "))

#heapsamount = 5
#nums = list(int(x) for x in '2 7 3 4 9'.split(" "))
#jamount = 4
#j = [1, 25, 11, 4]

b= list(borders(nums))

#for hp, number in zip(hps, j):

#hps = list(heap(*args) for args in b)
#for number in j:
	#for hp, hpnum in zip(hps, range(1,heapsamount+1)):
		#if number in hp:
			#print(hpnum)
			
			
sor = list([x, y, None] for x, y in zip(j, list(range(jamount))))

sor.sort(key=lambda x: x[0])

i=0
j=0
for number, index, n in sor:
	bord = b[i]
	
	while not inside(number, bord[0], bord[1]):
		i+=1
		bord = b[i]
		
	#while inside(number, bord[0], bord[1]):
	sor[j][2] = i+1
		
	j+=1
	
sor.sort(key=lambda x:x[1])
for x in sor:
	print(x[2])
		
		
	
	


n,a = int(input()), list(map(int, input().split()))
m,q = int(input()), list(map(int, input().split()))

dp = []
for i in range(n):
    dp += [i+1]*a[i]
for x in q:
    print (dp[x-1])

__author__ = 'hamed1soleimani'
import math
input()
p = input().split()
input()
q = input().split()


worms = list(range(10 ** 6))

m = 0
for i in range(len(p)):
    for j in range(int(p[i])):
        worms[m] = i
        m += 1

for x in q:
    print(worms[int(x) - 1] + 1)




n=int(input())
a=list(map(int,input().split())) 
m=int(input()) 
q=list(map(int,input().split()))

b=[]
for i in range(n):
    b+=[i+1]*a[i]
 

for i in q:
    print(b[i-1])


n = int(input())
a = list(map(int, input().split()))
input()
queries = list(map(int, input().split()))

ans = []
for i in range(n):
	ans += [i]*a[i]

for q in queries:
	print(ans[q-1]+1)


n = int(input())
pre = []
row = 1
for i in input().split(' '):
    for j in range(int(i)):
        pre.append(row)
    row += 1
m = int(input())
tasty_worms = []
for i in input().split(' '):
    i = int(i)
    print(pre[i - 1])


mp = {}
	
def main():

	a,b =-1,0
	n = int(input())
	line = input() #Read the whole line
	x = line.split()
 	
			
	for i in range(n):
		a = b
		b = b + int(x[i])
		for k in range(a+1,b+1):
                        mp[k] = 1 + i

	m = int(input())	
	line = input()
	q = line.split()

	for i in range(m):
		print(mp[int(q[i])])

main()	 


from itertools import accumulate

def bs(ws, w):
   i, e = -1, len(ws)-1
   
   while e-i > 1:
      m = (e+i)//2
      if w <= ws[m]:
         e = m
      else:
         i = m
   return e
   
input()
worms = list(accumulate(map(int, input().split())))
input()
tofind = list(map(int, input().split()))

print("\n".join(str(bs(worms, w)+1) for w in tofind))

3

from bisect import bisect_left

n = int(input())
A = list(map(int, input().split()))
m = int(input())
Q = list(map(int, input().split()))

sum_A = list(A)
for i in range(1, n):
    sum_A[i] += sum_A[i-1]
for q in Q:
    print(bisect_left(sum_A, q) + 1)

n = int(input())
a = [0]
b = list(map(int,input().split()))
for i in range(len(b)):
    for j in range(b[i]):
        a.append(i+1)
n = int(input())
b = list(map(int,input().split()))
for i in range(len(b)):
    print(a[b[i]])

    


# Codeforces contest 271d1 problem B

import bisect

n = int(input())
worms = [int(x) for x in input().split(' ')]
for i in range(n-1):
    worms[i+1] += worms[i]

m = int(input())
v = [int(x) for x in input().split(' ')]
[(lambda x: print(bisect.bisect_left(worms, x)+1))(x) for x in v]




import math
import random
import itertools
import collections
import sys
import time
import fractions
import os
import functools
import bisect


def timer(f):
    def tmp(*args, **kwargs):
        t = time.time()
        res = f(*args, **kwargs)
        print("Время выполнения функции: %f" % (time.time()-t))
        return res
    return tmp

def contains(l, elem):
    index = bisect.bisect_left(l, elem)
    if index < len(l):
        return l[index] == elem
    return False


n = int(input())

l = list(map(int, input().split(' ')))
q = int(input())
qs = list(map(int, input().split(' ')))

"""
n = 3
l = [5, 3, 4]
q = 12
qs = [i+1 for i in range(q)]
"""
"""
n = 5
l = [random.randint(0, 10) for i in range(n)]
q = random.randint(0, 15)
qs = [random.randint(0, 10) for i in range(q)]
l = sorted(l)
print(l)
print(qs)
"""

#print(l)
#print(qs)

partials = list(itertools.accumulate(l))
#print(partials)

for i in range(q):
    kuchka = bisect.bisect_left(partials, qs[i])
    print(kuchka+1)

n = int(input())
a = list(map(int, input().split()))
m = int(input())
q = list(map(int, input().split()))

qq = sorted(q)
ans = dict()

limit = 0
i = 0
for k in qq:
    while not (limit < k <= limit + a[i]):
        limit += a[i]
        i += 1
    ans[k] = i + 1

for k in q:
    print(ans[k])


from bisect import bisect_left
n=int(input())
S=A=list(map(int,input().split()))
for i in range(1,n): 
  S[i] += S[i-1]
m=int(input())
for q in list(map(int,input().split())):
  print(bisect_left(S, q)+1)

from sys import stdin

def main():
    '''
    Name: Kevin S. Sanchez
    Code: B. Worms
    '''
    inp = stdin
    n = int(inp.readline())
    worms = list(map(int, inp.readline().split()))
    J = int(inp.readline())
    Jworms = list(map(int, inp.readline().split()))

    lunch = list()
    
    for i in range (0,len(worms)):
        lunch += [i+1] * worms[i]

    for i in Jworms:
        print(lunch[i-1])

main()


from bisect import *
n = int(input())
a = list(map(int, input().split()))
for i in range(n - 1): a[i + 1] += a[i]
input()
for i in map(int, input().split()): print(bisect_left(a, i) + 1)

from sys import stdin
from bisect import bisect_left

stdin.readline()
x, l = 0, []
for y in map(int, stdin.readline().split()):
    x += y
    l.append(x)
stdin.readline()

for y in map(int, stdin.readline().split()):
    print(bisect_left(l, y) + 1)


from sys import stdin
from bisect import bisect_left


def main():
    stdin.readline()
    x, a = 0, []
    for y in map(int, stdin.readline().split()):
        x += y
        a.append(x)

    stdin.readline()
    for x in map(int, stdin.readline().split()):
        print(bisect_left(a, x) + 1)


main()