#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000000 + 7;
const long long MOD1 = 998244353;
long long mod(long long x) { return (x % MOD + MOD) % MOD; }
long long mul(long long a, long long b) { return mod(mod(a) * mod(b)); }
string itos(long long s) {
  string str = to_string(s);
  return str;
}
long long stoi2(string s) {
  long long a = atoi(s.c_str());
  return a;
}
long long powerm(long long a, long long b, long long MOD) {
  a %= MOD;
  long long res = 1;
  while (b > 0) {
    if (b & 1) res = res * a % MOD;
    a = a * a % MOD;
    b >>= 1;
  }
  return res;
}
long long power(long long a, long long b) {
  long long res = 1;
  while (b > 0) {
    if (b & 1) res = res * a;
    a = a * a;
    b >>= 1;
  }
  return res;
}
bool isSubSequence(string str1, string str2, int m, int n) {
  if (m == 0) return true;
  if (n == 0) return false;
  if (str1[m - 1] == str2[n - 1])
    return isSubSequence(str1, str2, m - 1, n - 1);
  return isSubSequence(str1, str2, m, n - 1);
}
bool ispalindrome(long long len, string str) {
  for (int i = 0; i < len / 2; i++) {
    if (str[i] != str[len - 1 - i]) {
      return false;
    }
  }
  return true;
}
inline bool isPowerOfTwo(long long x) {
  return ((1LL << (long long)log2(x)) == x);
}
long long isprime(long long N) {
  if (N < 2 || (!(N & 1) && N != 2)) return 0;
  for (long long i = 3; i * i <= N; i += 2) {
    if (!(N % i)) return 0;
  }
  return 1;
}
vector<long long> factor;
void factors(long long n) {
  for (long long i = 1; i <= sqrt(n); i++) {
    if (n % i == 0) {
      if (i == n / i)
        factor.push_back(i);
      else {
        factor.push_back(i);
        factor.push_back(n / i);
      }
    }
  }
  sort((factor).begin(), (factor).end());
}
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long lcm(long long a, long long b) { return (a / gcd(a, b)) * b; }
bool isvalid(long long i, long long j, long long n) {
  if (i >= 0 && i < n && j >= 0 && j < n) return true;
  return false;
}
long long dx[8] = {0, 1, 1, 1, 0, -1, -1, -1};
long long dy[8] = {-1, -1, 0, 1, 1, 1, 0, -1};
long long binarytodecimal(string n) {
  string num = n;
  long long dec_value = 0;
  long long base = 1;
  long long len = num.length();
  for (int i = len - 1; i >= 0; i--) {
    if (num[i] == '1') dec_value += base;
    base = base * 2;
  }
  return dec_value;
}
long long extended_GCD(long long a, long long b, long long &x, long long &y) {
  if (a == 0) {
    x = 0;
    y = 1;
    return b;
  }
  long long x1, y1;
  long long gcd = extended_GCD(b % a, a, x1, y1);
  x = y1 - (b / a) * x1;
  y = x1;
  return gcd;
}
long long modinv(long long a, long long mod = MOD) {
  long long x, y;
  extended_GCD(a, mod, x, y);
  if (x < 0) x += mod;
  return x;
}
string dtb(long long n) {
  string s = "";
  while (n > 0) {
    if (n % 2 == 0)
      s.push_back('0');
    else
      s.push_back('1');
    n /= 2;
  }
  reverse((s).begin(), (s).end());
  return s;
}
long long getfactorisation(long long n) {
  long long N = 5e6 + 5;
  vector<long long> fact(N);
  for (int i = 0; i < N; i++) fact[i] = i;
  for (int i = 2; i < N; i += 2) fact[i] = 2;
  for (long long i = 3; i <= N; i += 2)
    if (i == fact[i])
      for (long long j = i * i; j < N; j += i)
        if (fact[j] == j) fact[j] = i;
  vector<long long> res;
  while (n > 1) {
    res.push_back(fact[n]);
    n /= fact[n];
  }
  return res.size();
}
long long maxPrimeFactor(long long n) {
  long long maxPrime = -1;
  while (n % 2 == 0) {
    maxPrime = 2;
    n >>= 1;
  }
  for (int i = 3; i <= sqrt(n); i += 2) {
    while (n % i == 0) {
      maxPrime = i;
      n = n / i;
    }
  }
  if (n > 2) maxPrime = n;
  return maxPrime;
}
vector<long long> seive;
void Seive() {
  const long long maxn = 1e6 + 5;
  seive.resize(maxn);
  for (long long i = (long long)0; i < (long long)maxn; i++) seive[i] = i;
  for (long long i = 2; i <= maxn; i += 2) seive[i] = 2;
  seive[1] = -1;
  seive[0] = -1;
  for (long long i = 3; i <= maxn; i += 2)
    if (i == seive[i])
      for (long long j = i * i; j < maxn; j += i)
        if (seive[j] == j) seive[j] = i;
}
void factorisation(long long n) {
  vector<long long> res;
  for (long long i = 2; i * i <= n; i++) {
    if (n % i == 0) {
      while (n % i == 0) {
        n /= i;
        res.push_back(i);
      }
    }
  }
  if (n > 1) res.push_back(n);
}
long long fac[200005];
unsigned long long modInverse(unsigned long long n, int p) {
  return powerm(n, p - 2, p);
}
long long nCrModPFermat(unsigned long long n, int r, int p) {
  if (n < r) return 0;
  if (r == 0) return 1;
  unsigned long long fac[n + 1];
  fac[0] = 1;
  for (int i = 1; i <= n; i++) fac[i] = (fac[i - 1] * i) % p;
  return (fac[n] * modInverse(fac[r], p) % p * modInverse(fac[n - r], p) % p) %
         p;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  long long T = 1;
  while (T--) {
    long long n, q;
    cin >> n >> q;
    vector<long long> v(n), k(q);
    for (long long i = (long long)0; i < (long long)n; i++) cin >> v[i];
    for (long long i = (long long)0; i < (long long)q; i++) cin >> k[i];
    for (long long i = (long long)1; i < (long long)n; i++) v[i] += v[i - 1];
    long long sum = 0;
    for (long long i = (long long)0; i < (long long)q; i++) {
      sum += k[i];
      long long lower = (lower_bound(v.begin(), v.end(), sum) - v.begin());
      if (lower == n) {
        cout << n;
        sum = 0;
      } else {
        if (v[lower] > sum) {
          if (lower == 0) {
            cout << n;
          } else {
            lower--;
            cout << n - lower - 1;
          }
        } else {
          if (lower == n - 1) {
            cout << n;
            sum = 0;
          } else
            cout << n - lower - 1;
        }
      }
      cout << '\n';
    }
  }
}

### Prompt

Please formulate a Cpp solution to the following problem:

Ivar the Boneless is a great leader. He is trying to capture Kattegat from Lagertha. The war has begun and wave after wave Ivar's warriors are falling in battle.

Ivar has n warriors, he places them on a straight line in front of the main gate, in a way that the i-th warrior stands right after (i-1)-th warrior. The first warrior leads the attack.

Each attacker can take up to a_i arrows before he falls to the ground, where a_i is the i-th warrior's strength.

Lagertha orders her warriors to shoot k_i arrows during the i-th minute, the arrows one by one hit the first still standing warrior. After all Ivar's warriors fall and all the currently flying arrows fly by, Thor smashes his hammer and all Ivar's warriors get their previous strengths back and stand up to fight again. In other words, if all warriors die in minute t, they will all be standing to fight at the end of minute t.

The battle will last for q minutes, after each minute you should tell Ivar what is the number of his standing warriors.

Input

The first line contains two integers n and q (1 ≤ n, q ≤ 200 000) — the number of warriors and the number of minutes in the battle.

The second line contains n integers a_1, a_2, …, a_n (1 ≤ a_i ≤ 10^9) that represent the warriors' strengths.

The third line contains q integers k_1, k_2, …, k_q (1 ≤ k_i ≤ 10^{14}), the i-th of them represents Lagertha's order at the i-th minute: k_i arrows will attack the warriors.

Output

Output q lines, the i-th of them is the number of standing warriors after the i-th minute.

Examples

Input

5 5
1 2 1 2 1
3 10 1 1 1


Output

3
5
4
4
3


Input

4 4
1 2 3 4
9 1 10 6


Output

1
4
4
1

Note

In the first example: 

  * after the 1-st minute, the 1-st and 2-nd warriors die. 
  * after the 2-nd minute all warriors die (and all arrows left over are wasted), then they will be revived thus answer is 5 — all warriors are alive. 
  * after the 3-rd minute, the 1-st warrior dies. 
  * after the 4-th minute, the 2-nd warrior takes a hit and his strength decreases by 1. 
  * after the 5-th minute, the 2-nd warrior dies. 

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000000 + 7;
const long long MOD1 = 998244353;
long long mod(long long x) { return (x % MOD + MOD) % MOD; }
long long mul(long long a, long long b) { return mod(mod(a) * mod(b)); }
string itos(long long s) {
  string str = to_string(s);
  return str;
}
long long stoi2(string s) {
  long long a = atoi(s.c_str());
  return a;
}
long long powerm(long long a, long long b, long long MOD) {
  a %= MOD;
  long long res = 1;
  while (b > 0) {
    if (b & 1) res = res * a % MOD;
    a = a * a % MOD;
    b >>= 1;
  }
  return res;
}
long long power(long long a, long long b) {
  long long res = 1;
  while (b > 0) {
    if (b & 1) res = res * a;
    a = a * a;
    b >>= 1;
  }
  return res;
}
bool isSubSequence(string str1, string str2, int m, int n) {
  if (m == 0) return true;
  if (n == 0) return false;
  if (str1[m - 1] == str2[n - 1])
    return isSubSequence(str1, str2, m - 1, n - 1);
  return isSubSequence(str1, str2, m, n - 1);
}
bool ispalindrome(long long len, string str) {
  for (int i = 0; i < len / 2; i++) {
    if (str[i] != str[len - 1 - i]) {
      return false;
    }
  }
  return true;
}
inline bool isPowerOfTwo(long long x) {
  return ((1LL << (long long)log2(x)) == x);
}
long long isprime(long long N) {
  if (N < 2 || (!(N & 1) && N != 2)) return 0;
  for (long long i = 3; i * i <= N; i += 2) {
    if (!(N % i)) return 0;
  }
  return 1;
}
vector<long long> factor;
void factors(long long n) {
  for (long long i = 1; i <= sqrt(n); i++) {
    if (n % i == 0) {
      if (i == n / i)
        factor.push_back(i);
      else {
        factor.push_back(i);
        factor.push_back(n / i);
      }
    }
  }
  sort((factor).begin(), (factor).end());
}
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long lcm(long long a, long long b) { return (a / gcd(a, b)) * b; }
bool isvalid(long long i, long long j, long long n) {
  if (i >= 0 && i < n && j >= 0 && j < n) return true;
  return false;
}
long long dx[8] = {0, 1, 1, 1, 0, -1, -1, -1};
long long dy[8] = {-1, -1, 0, 1, 1, 1, 0, -1};
long long binarytodecimal(string n) {
  string num = n;
  long long dec_value = 0;
  long long base = 1;
  long long len = num.length();
  for (int i = len - 1; i >= 0; i--) {
    if (num[i] == '1') dec_value += base;
    base = base * 2;
  }
  return dec_value;
}
long long extended_GCD(long long a, long long b, long long &x, long long &y) {
  if (a == 0) {
    x = 0;
    y = 1;
    return b;
  }
  long long x1, y1;
  long long gcd = extended_GCD(b % a, a, x1, y1);
  x = y1 - (b / a) * x1;
  y = x1;
  return gcd;
}
long long modinv(long long a, long long mod = MOD) {
  long long x, y;
  extended_GCD(a, mod, x, y);
  if (x < 0) x += mod;
  return x;
}
string dtb(long long n) {
  string s = "";
  while (n > 0) {
    if (n % 2 == 0)
      s.push_back('0');
    else
      s.push_back('1');
    n /= 2;
  }
  reverse((s).begin(), (s).end());
  return s;
}
long long getfactorisation(long long n) {
  long long N = 5e6 + 5;
  vector<long long> fact(N);
  for (int i = 0; i < N; i++) fact[i] = i;
  for (int i = 2; i < N; i += 2) fact[i] = 2;
  for (long long i = 3; i <= N; i += 2)
    if (i == fact[i])
      for (long long j = i * i; j < N; j += i)
        if (fact[j] == j) fact[j] = i;
  vector<long long> res;
  while (n > 1) {
    res.push_back(fact[n]);
    n /= fact[n];
  }
  return res.size();
}
long long maxPrimeFactor(long long n) {
  long long maxPrime = -1;
  while (n % 2 == 0) {
    maxPrime = 2;
    n >>= 1;
  }
  for (int i = 3; i <= sqrt(n); i += 2) {
    while (n % i == 0) {
      maxPrime = i;
      n = n / i;
    }
  }
  if (n > 2) maxPrime = n;
  return maxPrime;
}
vector<long long> seive;
void Seive() {
  const long long maxn = 1e6 + 5;
  seive.resize(maxn);
  for (long long i = (long long)0; i < (long long)maxn; i++) seive[i] = i;
  for (long long i = 2; i <= maxn; i += 2) seive[i] = 2;
  seive[1] = -1;
  seive[0] = -1;
  for (long long i = 3; i <= maxn; i += 2)
    if (i == seive[i])
      for (long long j = i * i; j < maxn; j += i)
        if (seive[j] == j) seive[j] = i;
}
void factorisation(long long n) {
  vector<long long> res;
  for (long long i = 2; i * i <= n; i++) {
    if (n % i == 0) {
      while (n % i == 0) {
        n /= i;
        res.push_back(i);
      }
    }
  }
  if (n > 1) res.push_back(n);
}
long long fac[200005];
unsigned long long modInverse(unsigned long long n, int p) {
  return powerm(n, p - 2, p);
}
long long nCrModPFermat(unsigned long long n, int r, int p) {
  if (n < r) return 0;
  if (r == 0) return 1;
  unsigned long long fac[n + 1];
  fac[0] = 1;
  for (int i = 1; i <= n; i++) fac[i] = (fac[i - 1] * i) % p;
  return (fac[n] * modInverse(fac[r], p) % p * modInverse(fac[n - r], p) % p) %
         p;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  long long T = 1;
  while (T--) {
    long long n, q;
    cin >> n >> q;
    vector<long long> v(n), k(q);
    for (long long i = (long long)0; i < (long long)n; i++) cin >> v[i];
    for (long long i = (long long)0; i < (long long)q; i++) cin >> k[i];
    for (long long i = (long long)1; i < (long long)n; i++) v[i] += v[i - 1];
    long long sum = 0;
    for (long long i = (long long)0; i < (long long)q; i++) {
      sum += k[i];
      long long lower = (lower_bound(v.begin(), v.end(), sum) - v.begin());
      if (lower == n) {
        cout << n;
        sum = 0;
      } else {
        if (v[lower] > sum) {
          if (lower == 0) {
            cout << n;
          } else {
            lower--;
            cout << n - lower - 1;
          }
        } else {
          if (lower == n - 1) {
            cout << n;
            sum = 0;
          } else
            cout << n - lower - 1;
        }
      }
      cout << '\n';
    }
  }
}

```