C. The OG 3ATATEET
time limit per test
1 s.
memory limit per test
256 MB
input
standard input
output
standard output

$$$3AT3EET$$$ has a strange hobby: he loves shooing away pigeons. Today, he decided to practice his hobby in an infinite tower.

His friend, $$$The\_OG\_Kashish$$$, resides on the $$$k-th$$$ floor of this tower. $$$3AT3EET$$$ starts at the ground floor (floor $$$0$$$) and wants to reach $$$The\_OG\_Kashish$$$'s floor to join him in shooing the pigeons.

The tower is equipped with a very peculiar elevator. It has only two buttons:

$$$UP$$$: Moves the elevator exactly $$$x$$$ floors up (adds $$$x$$$ to the current floor).

$$$DOWN$$$: Moves the elevator exactly $$$1$$$ floor down (subtracts $$$1$$$ from the current floor).

Note that since the tower is infinite, the floor number can go arbitrarily high, but it cannot go below zero.

Your task is to determine the minimum number of button presses required for $$$3AT3EET$$$ to go from floor $$$0$$$ to floor $$$k$$$.

Input

The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases.

The only line of each test case contains two integers $$$x$$$ and $$$k$$$ ($$$1 \le x, k \le 10^9$$$) — the number of floors the elevator moves up, and the target floor where $$$The\_OG\_Kashish$$$ lives.

Output

For each test case, print a single integer — the minimum number of button presses required to reach floor $$$k$$$.

Example
Input
4
5 20
5 22
3 11
3 1000000000
Output
4
8
5
333333336