#D11000. The Number of Windows

    ID: 9148 Type: Default 3000ms 134MiB

The Number of Windows

The Number of Windows

For a given array a1,a2,a3,...,aNa_1, a_2, a_3, ... , a_N of NN elements and QQ integers xix_i as queries, for each query, print the number of combinations of two integers (l,r)(l, r) which satisfies the condition: 1lrN1 \leq l \leq r \leq N and al+al+1+...+ar1+arxia_l + a_{l+1} + ... + a_{r-1} + a_r \leq x_i.

Constraints

  • 1N1051 \leq N \leq 10^5
  • 1Q5001 \leq Q \leq 500
  • 1ai1091 \leq a_i \leq 10^9
  • 1xi10141 \leq x_i \leq 10^{14}

Input

The input is given in the following format.

NN QQ a1a_1 a2a_2 ... aNa_N x1x_1 x2x_2 ... xQx_Q

Output

For each query, print the number of combinations in a line.

Example

Input

6 5 1 2 3 4 5 6 6 9 12 21 15

Output

9 12 15 21 18

inputFormat

Input

The input is given in the following format.

NN QQ a1a_1 a2a_2 ... aNa_N x1x_1 x2x_2 ... xQx_Q

outputFormat

Output

For each query, print the number of combinations in a line.

Example

Input

6 5 1 2 3 4 5 6 6 9 12 21 15

Output

9 12 15 21 18

样例

6 5
1 2 3 4 5 6
6 9 12 21 15
9

12 15 21 18

</p>