408219: GYM103055 M Game Theory

Memory Limit:512 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

M. Game Theorytime limit per test1 secondmemory limit per test512 megabytesinputstandard inputoutputstandard output

Grammy is a CS professor at Sakuya Academy and she teaches Game Theory this semester.

Including Grammy herself, there are $$$n$$$ people in the class. Today, in order to attract students' interest, she decides to play a game with all students.

For each student, Grammy will pick an integer $$$x$$$ ($$$1 \leq x \leq 20)$$$. Without knowing what Grammy picks, the student will also pick another integer $$$y$$$ ($$$1 \leq y \leq 20)$$$. In the next step, Grammy calculate the score through the following procedure with each student independently.

  • Grammy will give the student $$$x$$$ points.
  • The student will give Grammy $$$y$$$ points.
  • If Grammy's integer $$$x$$$ is strictly greater than $$$y$$$, then she will obtain $$$10$$$ extra points from the student.
  • If Grammy's integer $$$x$$$ is strictly less than $$$y$$$, then she will give $$$10$$$ extra points to the student.

Now Grammy wants to know the expected amount of points she may win from all students if she chooses to pick the integer randomly and independently, which means for all integers in $$$[1,20]$$$, they all share the same possibility. Since students are very clever, you may assume that they will follow the optimal strategy in this game to maximize their final score.

Note that during the game, if one gives out points, he will lose the same amount of points. Moreover, the total point one obtains can be negative.

Input

The input contains only a single case.

The only line of the input contains an integer $$$n$$$ ($$$1 \leq n \leq 1\,000$$$), indicating the total number of people in the class (Including Grammy).

Output

Output the answer in one line. Your answer will be considered correct if and only if the absolute or relative error does not exceed $$$10^{-4}$$$.

ExampleInput
1
Output
0.0000

加入题单

上一题 下一题 算法标签: