Go Back

##### Cibin Needs To Bunk (100)

Description

“ It’s not who you are underneath, It’s what you do that defines you “ . Cibin has kept this a secret for a long time, he is one of the Avengers. He needs to help the Avengers to save the world from a new evil. But as always, even if the world is at a threat, attendance is the most important thing for students.

All Cibin needs to do, is to keep his attendance greater than or equal to 75%.

There are a total of N lectures. Cibin has attended P lectures till now, and has bunked A lectures till now. As Cibin also needs to save the world, find out the minimum number of more lectures he needs to attend so that his attendance will be greater than or equal to 75%.

Input

The first line of the input consists of a single integer T, denoting the number of Test Cases.

Each test case consists of one single line.

Each of these single lines consists of 3 space separated integers N, P and A.

Output

For each test case, output one single line.

Each line should contain the answer to the corresponding test case, the minimum number of more lectures he needs to attend so that his attendance will be greater than or equal to 75%.

If there is a chance that even after attending all the remaining lectures, his attendance remains less than 75%, print -1 instead.

Constraints

1 <= T <= 50

0 <= A, P <= N <= 1000

Example

Copy Input

Input:

3

20 10 3

5 1 0

20 5 12

Output:

5

3

-1

Explanation

Test Case 1:

Cibin can attend 5 lectures out of 7 remaining lectures, which makes his attendance 15/20 = 75%.

Test Case 3:

Even if Cibin attends the remaining 3 lectures, his attendance remains 8/20 = 40%.

As it is less than 75%, answer is -1.