406085: GYM102263 G Card Game

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

Description

G. Card Gametime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output

Zeyad and Ehab are playing a simple card game, each player initially has a deck of $$$n$$$ cards numbered from $$$1$$$ to $$$n$$$, the game lasts $$$n$$$ turns and in each turn both players privately choose one card and then both players reveal the chosen cards, the player that chose the card with the higher number earns points equal to that number, for example if Ehab chooses $$$4$$$ and Zeyad chooses $$$6$$$ Zeyad earns $$$6$$$ points, if the numbers chosen are equal no one earns any point, the cards chosen do not return to the deck, they are discarded instead.

Ehab doesn't care about winning or losing, he cares about mathematical values of the game, specifically he wants to know the expected number of points he'll earn considering all possible outcomes, can you help him?

Input

The first and only line of input contains a single integer $$$n(1 \leq n \leq 10^6)$$$.

Output

Print a real number, the expected number of points Ehab will earn in the game.

The answer is considered correct if the absolute or relative error is not greater than $$$10^{-6}$$$.

ExamplesInput
3
Output
2.6666666667
Input
7
Output
16.0000000000

Source/Category

加入题单

上一题 下一题 算法标签: