This page is still under construction.

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

Intersection of Parabolas

Time limit1sMemory limit256 MB

Summary
Find the area of the region bounded by the parabolas y=(x-a)^2 and x=(y-a)^2, given a up to 10^18, printed to exactly 10 decimals.
Level

Medium6 of 10

Topics
Math, Geometry, Binary search, Implementation
Solved
No attempts yet

Problem

Find the area of the region bounded by the two parabolas y=(x−a)2y=(x-a)^{2} and x=(y−a)2x=(y-a)^{2}.

Input

The first line contains a single integer aa (1≤a≤10181 \le a \le 10^{18}).

Output

Print the answer with exactly 1010 digits after the decimal point, using the standard rounding rules.

Examples1

  1. Example 1

    Input
    2
    
    Expected output
    7.6666666667