Absurdistan Roads II

No attempts yetTime limit1sMemory limit256 MB

Problem

Absurdistan has NN cities. Last year every city picked one city other than itself and built a single road joining the two. Every road can be travelled in both directions.

Each city picks uniformly at random among the other N1N-1 cities, and the cities choose independently. So there are (N1)N(N-1)^N possible road networks and all of them are equally likely. If two cities pick each other, two separate roads run between them.

The road network is connected when the NN roads let you travel from any city to every other city. Compute the probability that the road network is connected.

Input

The first line contains the number of cities NN. (2N1402 \le N \le 140)

Output

Print the probability that the road network is connected. Print exactly 12 digits after the decimal point, rounding the 13th digit away from zero when it is 5 or more. If the probability is 1, print 1.000000000000.