package main import ( "bufio" "fmt" "math/big" "os" "strconv" ) var sc = bufio.NewScanner(os.Stdin) func main() { sc.Split(bufio.ScanWords) t1, t2, t3 := nextInt64(), nextInt64(), nextInt64() m := lcm(lcm(t1*t2, t1*t3), lcm(t2-t1, t3-t1)) r := big.NewRat(t1*t2*m, m*(t2-t1)) fmt.Println(r) } func nextLine() string { sc.Scan() return sc.Text() } func nextInt() int { i, _ := strconv.Atoi(nextLine()) return i } func nextInt64() int64 { i, _ := strconv.ParseInt(nextLine(), 10, 64) return i } func nextUint64() uint64 { i, _ := strconv.ParseUint(nextLine(), 10, 64) return i } func nextFloat() float64 { f, _ := strconv.ParseFloat(nextLine(), 64) return f } func gcd(a, b int64) int64 { for ; b != 0; b, a = a%b, b { } return a } func lcm(a, b int64) int64 { return (a * b) / gcd(a, b) }