#BS0000007. Những con sâu (Worms)

Những con sâu (Worms)

Worms

Source: Codeforces

Version: Phuoc Hung OJ Extended

Problem Statement

There are nn ordered piles of worms. Pile ii contains aia_i worms. All worms are labeled consecutively across the piles, starting from label 11.

For each queried label qjq_j, determine which pile contains that worm.

Input

The first line contains nn.

The second line contains a1,a2,…,ana_1,a_2,\ldots,a_n.

The third line contains mm.

The fourth line contains q1,q2,…,qmq_1,q_2,\ldots,q_m.

Output

For each query, print the 1-based pile number containing the queried label.

Subtasks

  • Subtask 1 — 20%: 1≤n,m≤1001\le n,m\le100.
  • Subtask 2 — 30%: 1≤n,m≤50001\le n,m\le5000.
  • Subtask 3 — 50%: 1≤n,m≤1051\le n,m\le10^5, 1≤ai≤1031\le a_i\le10^3, ∑ai≤106\sum a_i\le10^6, 1≤qj≤∑ai1\le q_j\le\sum a_i.

Examples

Input

5
2 7 3 4 9
3
1 25 11

Output

1
5
3

Explanation

The pile-ending prefix sums are [2,9,12,16,25][2,9,12,16,25]. Label 1111 is greater than 99 and at most 1212, so it belongs to pile 33.