Jack and Jill

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

문제

There are nn males and nn females who participate in a dance competition. The competition is held according to the following rules:

  1. Initially males and females are randomly matched into nn couples, and all the couples are arranged in a circle.
  2. The judge flips a coin and determines the number kk, which is either 11 or 22 with equal probability. After that, another flip of a coin determines either "clockwise" or "counter-clockwise" direction, also with equal probability.
  3. In accordance with coin flips on the previous step, females switch partners by moving on the circle by kk positions in the corresponding direction (while males remain in place).
  4. If, after moving, a female matches a male with whom she already danced in one of the previous rounds, the competition ends, and judges determine the winners. Otherwise, the current couples dance a round, judges carefully evaluate them, and then the process goes to step 22.

Determine the expected number of rounds which will be danced during the competition.

입력

A single line containing integer nn (2n502 \le n \le 50).

출력

Output the answer with accuracy 10910^{-9}.