CIELBTL
Chef Ciel bought a new video game for guests to kill time until their orders arrive. In this game, you are a fighter in a battle arena, and you will fight against a fighter called Shindannin. In Japan, many people believe that the next day will be a happy day if they beat Shindannin, otherwise the next day will be an unhappy day.
Let's start by defintions of some variables. VA and VB denote your initial HP (health points) and Shindannin's initial HP respectively. SA and SB denote your strength and Shindannin's strength respectively. MA denotes your initial MP (magical points), which is used when you use a skill. Note that only you can use a skill in the battle.
In each turn, the battle will go on as follows:
When a fighter's HP is down to zero or a negative integer, this fighter loses. If both fighters' HP is down to zero or negative integer simultaneously, you will fight against Shindannin again with the same conditions, that is, HP and MP are recovered completely before next battle. There is no limit on the number of rematches. If you fight optimally, what is your winning percentage?
An input contains 5 integers VA, VB, SA, SB and MA.
Print the maximum winning percentage you can achieve. This value must have an absolute error no more than 10-6.
1 ≤ VA, VB ≤ 100
1 ≤ SA, SB ≤ 100
0 ≤ MA ≤ 5
5 5 3 3 0
0.5
5 5 3 3 1
0.58886609097948
58 85 8 13 0
0.00011046536069