Rats
To celebrate the Lunar New Year of the Rat, Douglas decides to count the number of rats living in his area. It is impossible for him to find all rats, as they tend to be well hidden. However, on the first day of the new year, Douglas manages to capture n[1]
rats, and marks each of them with an ear tag before releasing them. On the second day of the new year, Douglas captures n[2]
rats, and observes that n[12]
of them had been marked during the first day.
Douglas is asking for your help to estimate the total number of rats in his area. Looking up in your statistics textbook, you propose using the Chapman estimator N, given by:
where [x] is the floor of a real number x, i.e. the closest integer less than or equal to x.
Input
Consists of a single line, with three space-separated integers: n[1]
, n[2]
, n[12]
(0 ≤ n[1]
, n[2]
≤ 10000, 0 ≤ n[12]
≤ min(n[1]
, n[2]
)), in that order.
Output
Print a single line with the single integer N.