Queen#1418

Queen

1 second
122.599 megabytes
Easy

Compute the average number of squares a queen attacks on a generalized n \times n chessboard.

The queen attacks all squares in the same row, column, or diagonal. For example, the queen shown as Q in the image below attacks 17 squares, as marked with dots:

prb1418

Input

The only line contains a positive integer (1 \leq n \leq 10^6), the number of rows and columns of the board.

Output

Print one real number, the average number of squares attacked by a queen, rounded to exactly three decimal places.

Examples

Example 1

Loading
Loading