#B3729. The Delayed Rabbit Race

    ID: 11388 Type: Default 1000ms 256MiB

The Delayed Rabbit Race

The Delayed Rabbit Race

The Rabbit challenges the Turtle to another race. However, learning from previous mistakes, the Rabbit decides to delay his start by sleeping for t minutes after the race begins.

The Turtle runs at a constant speed of x meters per minute, and the Rabbit runs at y meters per minute, where x < y. The Turtle starts immediately, while the Rabbit starts after t minutes of delay. They race over a distance D meters. The Turtle is considered to finish the race at time D/x and the Rabbit at t + D/y.

You are to compute the largest integer distance D (in meters) such that the Turtle finishes the race at the same time as or earlier than the Rabbit.

This condition can be written as:

$$\frac{D}{x} \leq t + \frac{D}{y}$$

Simplifying the inequality, we derive:

$$D \leq \frac{t \times x \times y}{y - x}$$

Your task is to compute the maximum integer D that satisfies this condition.

inputFormat

The input consists of a single line with three space-separated integers: t (t: the delay time in minutes), x (the Turtle's speed in meters per minute), and y (the Rabbit's speed in meters per minute, with x < y).

outputFormat

Output a single integer, which is the maximum race distance D (in meters) such that the Turtle can finish the race at or before the Rabbit.

sample

1 2 3
6