시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 512 MB1671159570.896%

문제

Volleyball match at Mars is played by two teams until one of the teams gets k points, with score at least 2 points more than the score of the other team. For each ball played exactly one of the teams gets 1 point.

Now the score of the first team if x, the score of the second team is y. What is the minimal number of balls that must be played until one of the teams wins the match?

입력

Input contains several test cases. The first line contains integer t — the number of cases (1 ≤ t ≤ 5000).

Each test case is described using one line that contains three integers separated by spaces: k, x and y (1 ≤ k ≤ 100; 0 ≤ x, y ≤ 100).

It is guaranteed that the score can be obtained in a correct unfinished game.

출력

For each test case print one line — the minimal number of balls to be played, until the match is finished.

예제 입력 1

3
2 1 0
3 4 3
5 0 0

예제 출력 1

1
1
5