eolymp
bolt
Try our new interface for solving problems

Queen

Compute how many squares on average does a queen attack on a generalized chess board n × n.

The queen attacks a square if it is on the same row, column or diagonal. For example, the queen denoted by the letter Q in the image bellow attacks 17 squares marked with dots:

prb1418

Input

The first line contains positive integer n (1n106), the number of lines and columns of a board.

Output

The output consists of one real number rounded to exactly three decimal places, the average number of fields attacked by a queen.

Time limit 1 second
Memory limit 122.6 MiB
Input example #1
3
Output example #1
6.222