2843: 【例32.2】 凑数

Memory Limit:64 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

现有两个正整数 $x$,$y$,试问你在 $1000$ 以内最大既不是 $x$ 的倍数,也不是 $y$ 的倍数的正整数是多少?

Input

只有两个整数 $x$,$y4($2≤x,y≤1000$)。

Output

一个正整数表示答案。

Sample Input Copy

2 3

Sample Output Copy

997