#P4057. Tsinghua Morning Run Reunion

    ID: 17305 Type: Default 1000ms 256MiB

Tsinghua Morning Run Reunion

Tsinghua Morning Run Reunion

In Tsinghua, sports are an indispensable part of students' lives. To respond to the university's call for physical activity, the exemplary student Captain Wang decides to go for a morning run. However, due to various reasons, it is not realistic for him to run every single day. Hence, he chooses to run every \(a\) days. In other words, if he runs on a certain day, he will rest for \(a-1\) days and then run again on the \(a^{th}\) day, and so forth.

Inspired by Captain Wang, his good friends Xiaoqin and Xiao Zhen decide to run as well. However, they choose different schedules: Xiaoqin runs every \(b\) days while Xiao Zhen runs every \(c\) days.

One morning, all three meet while running and decide to count that day as day 0. Given that all three have the same running routes and time periods, the next day when all three meet will be determined by the least common multiple (\(\mathrm{lcm}(a,b,c)\)) of their running intervals. Your task is to calculate the next meeting day.

inputFormat

The input consists of three positive integers \(a\), \(b\), and \(c\) separated by spaces, where each represents the frequency (in days) at which Captain Wang, Xiaoqin, and Xiao Zhen run respectively. You may assume that \(1 \leq a, b, c \leq 10^9\).

outputFormat

Output a single integer representing the next day (after day 0) on which all three runners will meet.

sample

3 4 5
60

</p>