#include <bits/stdc++.h>
int busca(int a[], int n, int k) {
  int l = 0;
  int r = n - 1;
  while (l <= r) {
    int m = (l + r) / 2;
    if (k >= a[m] && k <= a[m + 1] && m % 2 == 0)
      return (m / 2 + 1);
    else if (k >= a[m - 1] && k <= a[m] && m % 2 == 1)
      return (m / 2 + 1);
    else if (k < a[m])
      r = m - 1;
    else
      l = m + 1;
  }
  return -1;
}
int main() {
  int n, m, aux, piles[100002], sum[200005], label;
  scanf("%d", &n);
  scanf("%d", &aux);
  piles[0] = aux;
  sum[0] = 1;
  sum[1] = aux;
  for (int i = 1; i < n; i++) {
    scanf("%d", &piles[i]);
    sum[i * 2] = sum[i * 2 - 1] + 1;
    sum[i * 2 + 1] = sum[i * 2 - 1] + piles[i];
  }
  scanf("%d", &m);
  for (int i = 0; i < m; i++) {
    scanf("%d", &label);
    printf("%d\n", busca(sum, n * 2 + 1, label));
  }
  return 0;
}
