#include <bits/stdc++.h>
using namespace std;
int chk[1000002] = {0};
int g;
int main() {
  int n;
  cin >> n;
  int a[n], suf[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  suf[0] = a[0];
  int k = 1, d;
  for (int j = 0; j < n; j++) {
    for (int i = 0; i < a[j]; i++) chk[k++] = j + 1;
  }
  cin >> d;
  while (d--) {
    cin >> g;
    int l = 1, h = 1000002, md;
    while (l <= h) {
      md = (l + h) >> 1;
      if (g > md)
        l = md + 1;
      else if (g < md)
        h = md - 1;
      else {
        cout << chk[g] << "\n";
        break;
      }
    }
  }
}
