This page is still under construction.

Parts of this page are still being built. What you see may change.

Poster mailing

Interview

Time limit1sMemory limit1024 MB

Summary
Given three paper basis weights, compute the total weight in grams of an envelope, two posters, and an info sheet from their dimensions.
Level

Easy2 of 10

Topics
Math, Implementation, Geometry
Solved
No attempts yet

Problem

VE OCH FASA! For the 13371337th year in a row, PostNord has raised the postage, and the budget of the Programming Olympiad (Programmeringsolympiaden, PO) is at risk of breaking.

Every year PO sends posters to about 450450 upper secondary schools. One mailing consists of three things:

  • an envelope of C4 size (229 mm×324 mm229\text{ mm} \times 324\text{ mm})
  • two posters of A3 size (297 mm×420 mm297\text{ mm} \times 420\text{ mm})
  • one information sheet of A4 size (210 mm×297 mm210\text{ mm} \times 297\text{ mm})

The letter must weigh at most 5050 grams, since otherwise the postage is twice as high. To meet this magic weight limit, PO can choose which kind of paper is used for the three things. Each kind has a basis weight (weight per area), usually given in gramm2\frac{\text{gram}}{\text{m}^2}. Note that the envelope is made of two sheets glued together of C4 size, while the basis weights and the dimensions above apply to one sheet.

Write a program that computes the total weight of one letter.

Input

The input consists of three integers between 5050 and 200200, the basis weights in gramm2\frac{\text{gram}}{\text{m}^2} of the kinds used for the envelope, the posters, and the information sheet, respectively.

Output

Print a single real number: the weight of one complete mailing in grams. The answer must be given with an accuracy of at least 33 decimals, that is, within 5⋅10−45 \cdot 10^{-4} of the correct answer.

Examples2

  1. Example 1

    Input
    120 90 70
    
    Expected output
    44.626140
    
  2. Example 2

    Input
    150 200 90
    
    Expected output
    77.768100