Under construction

Still being built. Things may change

Alloy Coin

Time limit1sMemory limit1024 MB

Summary
Given two metal densities and the mass percentage of the denser metal, the task is to compute the density of the resulting alloy coin.
Level

Easy1 of 10

Topics
Math, Implementation
Solved
No attempts yet

Problem

The first prize in the 1st AGCU Cup includes a silver coin.

Bi-haeng-ssi collects commemorative coins. After spending his savings on coins, he spent the whole day cleaning them, and decided to rank the coins by density, the mass of a substance divided by its volume.

Bi-haeng-ssi does not have a scale, so he must estimate the density of a coin using only the information he already has. He knows that the coin is an alloy of two metals, the density of each metal before mixing, and the mass ratio of the two metals in the alloy.

The volume of the mixture equals the sum of the volumes of the two substances before mixing, and the mass of the mixture equals the sum of their masses before mixing.

Tell Bi-haeng-ssi the density of the coin.

Input

The first line contains three integers d1d_1, d2d_2, and χ\chi, separated by spaces, where 0<d1,d2,χ<1000 < d_1, d_2, \chi < 100.

d1d_1 and d2d_2 are the densities of the two metals in the coin and are different from each other. Their unit is g/cm3\text{g}/\text{cm}^3.

χ\chi is the percentage of the coin's mass made up by the metal with the higher density. Its unit is %\%.

Output

Print the density of the coin on the first line, without the unit g/cm3\text{g}/\text{cm}^3. An absolute or relative error up to 10−610^{-6} is allowed.

Examples3

  1. Example 1

    Input
    8 10 50
    
    Expected output
    8.88888888888889
    
  2. Example 2

    Input
    8 2 80
    
    Expected output
    5.0
    
  3. Example 3

    Input
    1 99 50
    
    Expected output
    1.98