#include<bits/stdc++.h>
using namespace std;
const int ma = 1e6 + 10;
double b[ma], d[ma];
int main(){
ios::sync_with_stdio(false);
cin.tie(0),cout.tie(0);
int n, q;
cin >> n >> q;
for(int i = 1; i <= n; i++){
int x;
cin >> x;
b[i] = b[i - 1] + x - 0.000001;
}
while(q--){
int x;
cin >> x;
int o = lower_bound(b + 1, b + 1 + n, x) - b;
cout << o << endl;
}
return 0;
}