#include <bits/stdc++.h>
using namespace std;
int ara[100005];
int main() {
  int i, j, k;
  int n, q;
  int low, high, mid, ans;
  cin >> n;
  for (i = 0, j = 1; i < n; ++i) {
    cin >> k;
    ara[j] = ara[j - 1] + k;
    j++;
  }
  cin >> q;
  while (q--) {
    cin >> k;
    low = 1;
    high = n;
    ans = -1;
    while (high >= low) {
      mid = (low + high) / 2;
      if (ara[mid] >= k && ara[mid - 1] < k) {
        ans = mid;
        break;
      }
      if (ara[mid] < k)
        low = mid + 1;
      else
        high = mid - 1;
    }
    cout << ans << endl;
  }
}
