Under construction

Still being built. Things may change

Regular hexagon and triangles

Time limit2sMemory limit512 MB

Summary
Choose three non-crossing diagonals of a regular hexagon to maximize the smallest of the four resulting triangles' areas, for side length L.
Level

Easy3 of 10

Topics
Geometry, Greedy, Brute force
Solved
No attempts yet

Problem

You have a regular hexagon whose side length is LL. Drawing three diagonals that do not cross each other splits the hexagon into 4 triangles.

Let SS be the area of the smallest of those 4 triangles. The value of SS depends on which diagonals you draw. Write a program that finds the largest possible value of SS.

Input

The first line contains the side length LL of the regular hexagon. (1≤L≤1,000,0001 \le L \le 1{,}000{,}000, LL is an integer)

Output

Print the largest possible value of SS on the first line, rounded half up to exactly six digits after the decimal point. Always print all six digits, including a final 0. The answer is always irrational, so the rounded value is uniquely determined.

Examples3

  1. Example 1

    Input
    5
    
    Expected output
    10.825318
    
  2. Example 2

    Input
    10
    
    Expected output
    43.301270
    
  3. Example 3

    Input
    100000
    
    Expected output
    4330127018.922193