Dartboard#6258

Dartboard

1 second
64 megabytes
Easy

Jaap is playing darts at the local pub with a group of friends. His dart-throwing skills are not that great, so he just tries to aim at the center of the dartboard. His mathematical skills are better though, and he wonders what his expected score is for one dart.

After a while, Jaap estimates that his darts hit the dartboard (or sometimes miss it) with a probability distribution that depends only on the radius from the center of the board, and has the Gaussian form

That is, the probability of hitting a small surface area \Delta x \cdot \Delta y at a distance from the center is given by f(r) \Delta x \cdot \Delta y. Here, denotes the standard deviation, and Jaap found out that this depends strongly on how many beers he has had.

For those not familiar with the game of darts, a dartboard is depicted below. The score for hitting each of the regions of the dartboard is as follows:

Finally, if the dart lands outside the double ring, the score is zero. Note that the pies for all numbers have equal area.

Figure 1: A standard dartboard (from Wikimedia, CC BY-SA 3.0 licensed by Tijmen Stam).

Input

The first line contains floating point numbers of strictly increasing size: the radii of the bull's eye, bull, inner and outer triple ring, and inner and outer double ring, all in centimeters.

The second line contains the standard deviation in centimeters as a floating point number.

All floating point numbers are in the range [10^{-3},\ 100].

Output

Print the expected score of one dart for Jaap as a floating point number on a single line. The answer should be correct up to either a relative or absolute error of 10^{-4}.

Examples

Example 1

Loading
Loading