#include <bits/stdc++.h>
using namespace std;
int ceilSearch(int arr[], int low, int high, int x) {
  int mid;
  if (x <= arr[low]) return low;
  if (x > arr[high]) return -1;
  mid = (low + high) / 2;
  if (arr[mid] == x)
    return mid;
  else if (arr[mid] < x) {
    if (mid + 1 <= high && x <= arr[mid + 1])
      return mid + 1;
    else
      return ceilSearch(arr, mid + 1, high, x);
  } else {
    if (mid - 1 >= low && x > arr[mid - 1])
      return mid;
    else
      return ceilSearch(arr, low, mid - 1, x);
  }
}
int main() {
  int n;
  cin >> n;
  int a;
  int arr[100001];
  arr[0] = 0;
  for (int i = 1; i <= n; i++) {
    cin >> a;
    arr[i] = arr[i - 1] + a;
  }
  int m;
  cin >> m;
  for (int i = 0; i < m; i++) {
    cin >> a;
    int index = ceilSearch(arr, 1, n, a);
    cout << index << endl;
  }
  return 0;
}
