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 ai worms. He labeled all these worms with consecutive integers: worms in first pile are labeled with numbers 1 to a1, worms in second pile are labeled with numbers a1 + 1 to a1 + a2 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 ≤ 105), the number of piles.

The second line contains n integers a1, a2, ..., an (1 ≤ ai ≤ 103, a1 + a2 + ... + an ≤ 106), where ai is the number of worms in the i-th pile.

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

The fourth line contains m integers q1, q2, ..., qm (1 ≤ qi ≤ a1 + a2 + ... + an), 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 qi 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. 
#include <bits/stdc++.h>
using namespace std;
inline void normal(long long int& a) { a = (a + 1000000007) % 1000000007; }
inline int modMul(long long int a, long long int b) {
  a %= 1000000007, b %= 1000000007;
  normal(a), normal(b);
  return (a * b) % 1000000007;
}
inline int modAdd(long long int a, long long int b) {
  a %= 1000000007, b %= 1000000007;
  normal(a), normal(b);
  return (a + b) % 1000000007;
}
inline int modSub(long long int a, long long int b) {
  a %= 1000000007, b %= 1000000007;
  normal(a), normal(b);
  a -= b;
  normal(a);
  return a;
}
inline int modPow(long long int b, long long int p) {
  int r = 1;
  while (p) {
    if (p & 1) r = modMul(r, b);
    b = modMul(b, b);
    p >>= 1;
  }
  return r;
}
inline int modInv(int a) { return modPow(a, 1000000007 - 2); }
inline int modDiv(int a, int b) { return modMul(a, modInv(b)); }
inline int fact(int r) {
  int ans = 1;
  while (r) ans = modMul(ans, r), r--;
  return ans;
}
inline int invfact(int r) {
  int ans = 1;
  while (r) ans = modMul(ans, modInv(r)), r--;
  return ans;
}
inline double dgcd(double a, double b) {
  if (a < b) return dgcd(b, a);
  if (b < .0001) return a;
  return dgcd(b, fmod(a, b));
}
const long long int N = 2e5 + 1;
const long long int INF = 2e18;
clock_t start;
mt19937_64 rng(chrono::system_clock::now().time_since_epoch().count());
template <typename T1, typename T2>
istream& operator>>(istream& in, pair<T1, T2>& q) {
  in >> q.first >> q.second;
  return in;
}
template <typename T1, typename T2>
ostream& operator<<(ostream& out, pair<T1, T2>& q) {
  out << q.first << " " << q.second;
  return out;
}
template <typename T1, typename T2>
pair<T1, T2> operator+(pair<T1, T2> p1, pair<T1, T2> p2) {
  return {p1.first + p2.first, p1.second + p2.second};
}
template <typename T1, typename T2>
pair<T1, T2> operator-(pair<T1, T2> p1, pair<T1, T2> p2) {
  return {p1.first - p2.first, p1.second - p2.second};
}
long long int power(long long int base, long long int exp) {
  long long int res = 1;
  while (exp > 0) {
    if (exp % 2 == 1) res = (res * base) % 1000000007;
    base = (base * base) % 1000000007;
    exp /= 2;
  }
  return res % 1000000007;
}
bool isPrime(int n) {
  if (n <= 1) return false;
  if (n <= 3) return true;
  if (n % 2 == 0 || n % 3 == 0) return false;
  for (int i = 5; i * i <= n; i = i + 6)
    if (n % i == 0 || n % (i + 2) == 0) return false;
  return true;
}
void Timelimitexceeded() {
  long long int n;
  cin >> n;
  vector<long long int> v;
  long long int temp;
  for (long long int i = 0; i < n; i++) {
    long long int x;
    cin >> x;
    if (i == 0)
      v.push_back(x), temp = x;
    else {
      temp += x;
      v.push_back(temp);
    }
  }
  long long int q;
  cin >> q;
  while (q--) {
    long long int x;
    cin >> x;
    long long int l = 0, u = n;
    while (l <= u) {
      long long int mid = (l + u) / 2;
      if (v[mid] < x)
        l = mid + 1;
      else
        u = mid - 1;
    }
    cout << l + 1 << '\n';
  }
  return;
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  clock_t start, end;
  start = clock();
  cout << fixed << setprecision(11);
  while (t--) {
    Timelimitexceeded();
  }
  end = clock();
  double time_taken = double(end - start) / double(CLOCKS_PER_SEC);
}
