Skip to main content

~/algor $ cat contests/round-7/W

W. Mixing water

Problem W ICPC rules 1000 ms 64 MB

kg of water at degrees is poured into kg of water at degrees. No heat is lost. Find the temperature of the mixture:

Water in two vessels: one with mass m1 and temperature t1, the other with mass m2 and temperature t2; they are poured into one vessel and the mixture temperature t is found

Input

One line with four integers: , , and .

Output

One number — , with exactly 2 digits after the decimal point (for example, 35.71).

Note


Examples

Input #1
2 80 3 20
Output #1
44.00
Input #2
3 70 4 10
Output #2
35.71

Sign in to submit a solution

Signing up is free and takes a minute.