L. Recharge
time limit per test
1 с
memory limit per test
512 megabytes
input
standard input
output
standard output

The Binding of Isaac is a randomly generated action RPG shooter with heavy roguelike elements.

During the game, the player can pick up different items and cause different effects after being used, which adds a lot to the gameplay of this game. Activated items are a special category of items. Each activated item can be used once it is fully charged, thus a charge bar is used to denote the current charging progress. To charge an activated item, the player needs to clear the rooms: a small room fills $$$1$$$ unit of the charge bar, while a large room fills $$$2$$$ units of the charge bar. Specifically, for an activated item with only $$$1$$$ unit uncharged, clearing a large room has the same impact as clearing a small room. Using the activated item will empty the charge bar.

The most powerful activated item in the game, Void, has a charge bar size of 6 units, with 5 units charged.

Now, Shuishui is holding an activated item with a charge bar size of $$$k$$$ units. Initially, the charge bar is empty, and there are $$$x$$$ uncleared small rooms and $$$y$$$ uncleared large rooms on the map. Shuishui can choose to clear the uncleared rooms in arbitrary order. Please calculate the maximum number of times Shuishui uses the item.

Input

The input contains multiple testcases.

The first line contains an integer $$$t$$$ ($$$1\leq t\leq 2 \times 10^5$$$), denoting the number of testcases.

For each testcase, only one line contains three integers $$$k$$$, $$$x$$$, $$$y$$$ ($$$1 \leq k \leq 10^9$$$, $$$0 \leq x, y \leq 10^9$$$).

Output

For each testcase, output a single integer in one line, denoting the answer.

Example
Input
3
6 6 6
9 6 2
3 1 4
Output
3
1
2