8592: Cutting Papers

内存限制:256 MB 时间限制:1 S
题面:传统 评测方式:文本比较 上传者:
提交:3 通过:1

题目描述

NIO and his little four-year-old sister, Yasa, were doing the paper-cutting. NIO drew several line segments and get a close area, a polygon, from a mathematical inequality, ∣x∣+∣y∣+∣x+y∣≤n. And Yasa drew a circle and its center is coincide with the polygon's center that NIO created. The radius of the circle is half of n.

They wanted to cut out union area of the polygon and the circle. Assume that they play the cutting game based on a infinite paper. What is the size of the area they cut from the paper?

输入格式

The only line contains a single interger n (1≤n≤5×105).

输出格式

Output a real number, representing the union area of the circle and the polygon.

Your answer is acceptable if its absolute or relative error does not exceed 10−6.

输入样例 复制

2022

输出样例 复制

3649785.912339927

数据范围与提示

The inequality forms a polygon, and its center is the same with the circle. Output the size of union are of these two shapes.