#include <bits/stdc++.h>
using namespace std;
unsigned long long ull;
int main() {
  ull = 0;
  int n;
  cin >> n;
  int *A = new int[n];
  for (int i = 0; i < n; i++) {
    cin >> A[i];
  }
  int m;
  cin >> m;
  int zn;
  vector<pair<int, int> > ip(m);
  for (int i = 0; i < m; i++) {
    cin >> zn;
    ip[i].first = zn;
    ip[i].second = i + 1;
  }
  sort(ip.begin(), ip.end());
  int yl = 0;
  for (int i = 0; i < n; i++) {
    ull += A[i];
    for (int j = 0 + yl; j < m; j++) {
      if (ip[j].first <= ull) {
        ip[j].first = i + 1;
        yl++;
        swap(ip[j].first, ip[j].second);
      } else {
        break;
      }
    }
  }
  sort(ip.begin(), ip.end());
  for (int i = 0; i < m; i++) {
    cout << ip[i].second << endl;
  }
  return 0;
}
