#include <bits/stdc++.h>
int arr[1100000];
using namespace std;
int main() {
  memset(arr, 0, sizeof arr);
  int n;
  cin >> n;
  int x = 1, pre = 1;
  for (int i = 1; i <= n; i++) {
    int c;
    cin >> c;
    arr[x] = i;
    x += c;
  }
  x = arr[1];
  for (int i = 1; i <= 1000000; i++) {
    if (!arr[i])
      arr[i] = x;
    else
      x = arr[i];
  }
  int q;
  cin >> q;
  while (q--) {
    cin >> x;
    cout << arr[x] << endl;
  }
}
