P24377 [AtCoder] Throwing the Die
普及+
题目描述

Problem Statement

Let us play a game using a die. The game consists of at most N turns, each of which goes as follows.

  • Throw a 6-sided die that shows $1,\ldots,6$ with equal probability, and let X be the number shown (each throw is independent of the others).
  • If it is the N-th turn now, your score is X, and the game ends.
  • Otherwise, choose whether to continue or end the game.
  • If you end the game, your score is X, and there is no more turn.

Find the expected value of your score when you play the game to maximize this expected value.

Input

Input is given from Standard Input in the following format:
N

Output

Print the answer.
Your output is considered correct if its absolute or relative error from the true answer is at most 10^{-6}.

Constraints

  • $1 \leq N \leq 100$

Sample Input 1

1

Sample Output 1

3.5000000000

Sample Input 2

2

Sample Output 2

4.2500000000

Sample Input 3

10

Sample Output 3

5.6502176688

输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
1
样例输出
3.5000000000