Recently Chef bought a bunch of robot-waiters. And now he needs to know how much to pay for the electricity that robots use for their work. All waiters serve food from the kitchen (which is in the point (0, 0)) and carry it to some table (which is in some point (x, y)) in a shortest way. But this is a beta version of robots and they can only do the next moves: turn right and make a step forward or turn left and make a step forward. Initially they look in direction of X-axis. Your task is to calculate for each query the number of moves they’ll do to reach corresponding table.

 

Input
The first line of the input contains an integer T denoting the number of test cases. The description of T test cases follows. For each test case there is a sing line containing two space-separated integers - x and y.

Output
For each test case, output a single line containing number of moves that robot will make to reach point (x, y)

Constraints

1 ≤ T ≤ 10^5
-10^9 ≤ x, y ≤ 10^9

 

Example
Input:
2
3 3
3 4

Output:
6
7
 

Explanation
Example case 1. Sequence of moves would be LRLRLR
for t in range(0, input()):
    x, y = raw_input().split()
    x = int(x)
    y = int(y)

    diff = abs(x-y)
    x = abs(x)
    y = abs(y)

    max_val = max(x,y)
    sum = max_val << 1  
    
    if x < y:
        if diff % 2 != 0:
            sum -= 1
    elif y < x:
        if diff % 2 != 0:
            sum += 1

    print sum