Formation#2708

Formation

1 second
64 megabytes
Very easy

Once, an auditor visited military unit No. 192.168.0.9 and observed the formation of its soldiers. He noticed that when the soldiers lined up in rows of columns, the last row had N-1 soldiers, and when the same number of soldiers lined up in rows of columns, the last row had M-1 soldiers. All other rows were full.

Later, he needed to determine the number of soldiers in the unit based on this information. He realized that it is not possible to uniquely determine this number, so he decided to find the minimal possible number of soldiers. This task was delegated to his deputy, that is, to you. Congratulations.

Input

The input file contains two natural numbers and separated by a space (2 \le N,\ M \le 150000).

Output

Output a single number — the minimal possible number of soldiers in the unit. It is guaranteed that this number fits within the range of Longint.

Examples

Example 1

Loading
Loading