Under construction

Still being built. Things may change

Measuring the Height of a Cup Noodle

Interview

Time limit1sMemory limit512 MB

Summary
Given two parallel base diameters D1, D2 and the slanted side K of an isosceles trapezoid, compute the squared height.
Level

Easy3 of 10

Topics
Math, Geometry
Solved
No attempts yet

Problem

A cup noodle container is a conical frustum whose two bases are parallel and circular. Seen from the side, it is an isosceles trapezoid as in the figure below.

In the isosceles trapezoid above, Minsu measured the diameter of the top face of the cup noodle as D1 and the diameter of the bottom face as D2. The length of the side Minsu has not measured yet is K. Write a program that finds the value of (the height of the cup noodle)2. The height of the cup noodle is defined as the distance between the two parallel sides of the isosceles trapezoid.

Input

The first line gives the value of K. The second line gives the values of D1 and D2 in that order, separated by one space. The values of K, D1, and D2 are positive integers.

Output

Print the value of (the height of the cup noodle)2 on the first line. Absolute or relative error up to 10-6 is allowed.

Constraints

  • 0 < K, D1, D2 ≤ 100
  • 0 ≤ D1-D2 < 2×K

Examples3

  1. Example 1

    Input
    14
    12 12
    Expected output
    196
  2. Example 2

    Input
    8
    9 3
    Expected output
    55
  3. Example 3

    Input
    15
    13 6
    Expected output
    212.75