Xiao Kai has two types of coins with different denominations, both of which are positive integers and coprime. Xiao Kai has an infinite number of each type of coin. Without the possibility of receiving change, there are some items that Xiao Kai cannot pay for exactly using only these two types of coins. Now, Xiao Kai wants to know the value of the most expensive item that he cannot pay for exactly. Note: The input guarantees that such an item exists.
Input
The input consists of a single line containing two integers $a$ and $b$, separated by a space, representing the denominations of the coins Xiao Kai has.
Output
The output consists of a single integer $N$, representing the value of the most expensive item that Xiao Kai cannot pay for exactly without receiving change.
Examples
Input 1
3 7
Output 1
11
Note
Xiao Kai has an infinite number of coins with denominations 3 and 7. Without receiving change, he cannot pay exactly for items with values 1, 2, 4, 5, 8, and 11. Among these, the most expensive item has a value of 11. Items more expensive than 11 can all be purchased, for example: $12 = 3 \times 4 + 7 \times 0$ $13 = 3 \times 2 + 7 \times 1$ $14 = 3 \times 0 + 7 \times 2$ $15 = 3 \times 5 + 7 \times 0$ ...
Input 2
4 5
Output 2
11
Constraints
For 30% of the data: $1 \le a, b \le 50$.
For 60% of the data: $1 \le a, b \le 10,000$.
For 100% of the data: $1 \le a, b \le 1,000,000,000$.