Bike#765

Bike

1 second
122.174 megabytes
Easy

A cyclist wants to ride from point to point , where the distance between these points is meters. The cyclist has a bicycle that can reach a speed of m/s. Before setting out, the cyclist may upgrade his bicycle.

Input

The program reads three integers:

The distance (0 \leq l \leq 10^9) between the points, the initial speed (1 \leq v \leq 10^6) of the bicycle, and the number of available upgrades (0 \leq N \leq 100). Then pairs of integers are given; each pair describes one upgrade: the speed increase v_i (0 \leq v_i \leq 1000) after the upgrade, and the required time t_i (0 \leq t_i \leq 1000) to perform this upgrade. All values are given in SI units (meters and seconds).

Output

Print the minimum time required for the cyclist to travel from point to point , taking into account the time for upgrades, with six digits after the decimal point.

Examples

Example 1

Loading
Loading

Example 2

Loading
Loading