#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  int m;
  cin >> m;
  int q[m];
  for (int i = 0; i < m; ++i) {
    cin >> q[i];
  }
  int f[n];
  int u = 0;
  for (int i = 0; i < n; ++i) {
    u = u + a[i];
    f[i] = u;
  }
  for (int i = 0; i < m; ++i) {
    auto b = lower_bound(f, f + n, q[i]);
    int l = 0, r = n - 1;
    while (l <= r) {
      int mid = (l + r) / 2;
      if (f[mid] == *b) {
        cout << mid + 1 << " ";
        break;
      }
      if (f[mid] < *b)
        l = mid + 1;
      else
        r = mid - 1;
    }
  }
  return 0;
}
