Two distinct positive integers not exceeding are fixed. It is guaranteed that .
Dadas knows only the value of . Mog knows only the value of . Both people know and all rules of the problem.
Starting from day , both people simultaneously make exactly one of the following statements every day.
Before speaking, each person knows every statement made by both people on all previous days. A statement made by the other person on the current day cannot be used to decide the current statement. Every statement is truthful.
Find the first day on which at least one person says I know. If this never happens, find .
The input is given from Standard Input in the following format:
For each test case, print the first day on which at least one person says I know.
If this never happens, print .
Each case is given in the following format:
| 32 |
No additional constraints. |