#include <bits/stdc++.h>
using namespace std;
int n, m, a[1111111];
int main() {
  scanf("%d", &n);
  a[0] = 0;
  for (int i = 1; i <= n; ++i) {
    int x;
    scanf("%d", &x);
    a[i] = a[i - 1] + x;
  }
  scanf("%d", &m);
  while (m--) {
    int x;
    int res = 0;
    scanf("%d", &x);
    int lef = 1, rig = n;
    while (lef <= rig) {
      int mid = (lef + rig) / 2;
      if (a[mid] < x) {
        res = mid;
        lef = mid + 1;
      } else
        rig = mid - 1;
    }
    printf("%d ", res + 1);
  }
  return 0;
}
