"That's it, Stepan! I've had enough of you!"#7239

"That's it, Stepan! I've had enough of you!"

0,1 sekunt
256 megabaýt
Örän ýeňil

Stepan recently returned from a vacation in Japan with a new kind of chewing gum. During his first class back at university, he decided to share it with his friend. When the lecturer turned to the board, the two friends eagerly started blowing bubbles, counting "three - four" together. Stepan can blow a bubble to its maximum size in t_1 seconds, after which it bursts instantly, and he starts blowing a new bubble at the same rate. His friend follows the same process, but takes t_2 seconds to blow a bubble.

Throughout this time, the lecturer is so engrossed in proving a theorem that he notices nothing. However, if both bubbles burst at the same time, the lecturer will hear the noise and immediately turn around. The students will certainly get in trouble, especially Stepan, who brought the gum to class.

Determine how long the friends can enjoy blowing bubbles without being noticed by the lecturer.

For example, if t_1 = 2 and t_2 = 3, the following events occur:

- Stepan blows a bubble from t = 0 to t = 2, then it bursts, and he starts again from t = 2 to t = 4, and then once more from t = 4 to t = 6. - Stepan's friend blows a bubble from t = 0 to t = 3, and then from t = 3 to t = 6.

At t = 6, both bubbles burst simultaneously, so the lecturer turns around and says: "That's it, Stepan! I've had enough of you!"

Giriş

The first line contains two integers t_1 and t_2 (1 \le t_1, t_2 \le 10^9).

Çykyş

Output a single integer — the number of seconds that Stepan and his friend can continue blowing bubbles without being noticed.

Mysallar

1-nji mysal

Loading
Loading

2-nji mysal

Loading
Loading