Dadas is going to eat bowls of ramen one by one. Fully cooking the -th bowl takes units of time.
For each bowl, Dadas waits for at most units of time. Therefore, the actual waiting time before eating the -th bowl is . Eating takes time, and only one bowl is prepared at a time.
Thus, the total time until all bowls are eaten is
It is guaranteed that there exists at least one positive integer for which the total time is exactly . Find the minimum such .
Input
The input is given from Standard Input in the following format:
Each case is given in the following format:
Output
For each test case, print the minimum positive integer satisfying the condition on one line.
Constraints
- .
- .
- ().
- .
- The sum of over all test cases does not exceed .
- For every test case, there exists at least one positive integer satisfying .
Subtasks
Samples
Input
3
3 6
2 5 7
4 14
3 3 10 10
1 10
10
Output
2
4
10