5390: 【32课】【3193】凑数

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:72 Solved:54

Description

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

Input

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

Output

一个正整数表示答案。

Sample Input Copy

2 3

Sample Output Copy

997