Rounded Work

아직 제출이 없습니다시간 제한1초메모리 제한1024 MB

문제

Many professors assign group projects to help students develop teamwork skills, and to reduce the amount of work any single student has to do. Commonly, there is a fixed amount of work AA and a fixed number of students BB, and each student is expected to do roughly A/BA/B work. However, computer science students are notoriously afraid of fractions, so they end up actually doing round(A/B)\text{round}(A/B) work, where round(x)\text{round}(x) is the closest integer to xx by absolute value. (If two integers are equidistant from xx, the larger is chosen by convention.)

Any professor knows that choosing the group size BB is a difficult task: it seems that no matter which value they pick, some students beg for it to be lower and others ask for it to be higher. One enterprising professor has decided on an unimpeachable method: choose BB uniformly at random from the integers between 11 and an upper bound NN, inclusive.

The same problem arises when deciding how much work to assign each group, though: some students complain that they have to do too much work (they have other classes, after all!), while others beg for extra credit. Our professor has decided to adopt a similar solution: AA is chosen uniformly at random from the integers between 11 and NN inclusive as well. (Of course, AA and BB are chosen independently.)

The students aren't sure what to think of this random work scheme: they want to complain, but they don't know how much work they have to do in this scheme, so they cannot tell if it's too much or too little. To help them decide how to complain, compute the expected amount of work each student in a group does.

입력

The first and only line of input consists of a single integer, NN (1N1061 \leq N \leq 10^6).

출력

Output a single real number, the expected amount of work each student does if AA and BB random integers chosen independently between 11 and NN. Your answer is considered correct if its relative or absolute error is at most 10610^{-6}.

힌트

In the first case, AA and BB will both certainly be 11, round(A/B)\text{round}(A/B) will always be 11.

In the second case, we may get any of the following values for (A,B,round(A/B))(A, B, \text{round}(A/B)):

  • (1,1,1)(1, 1, 1)
  • (1,2,1)(1, 2, 1)
  • (1,3,0)(1, 3, 0)
  • (2,1,2)(2, 1, 2)
  • (2,2,1)(2, 2, 1)
  • (2,3,1)(2, 3, 1)
  • (3,1,3)(3, 1, 3)
  • (3,2,2)(3, 2, 2)
  • (3,3,1)(3, 3, 1)

The average of these results is 12/9=4/312/9 = 4/3.