In a space-themed game, mankind is scattered across N mutually hostile planets. Travel between planets uses special hyperspace tunnels. Each tunnel connects two planets and works for two-way communication. At most one tunnel may connect any pair of planets. The set of all tunnels is called the map of the game.
The map is generated at random by the following procedure. For each pair of distinct planets i and j (1≤i<j≤N), a real number Xij (0≤Xij≤1) is generated independently from the uniform distribution. If Xij≤P, where P is a given real parameter, the tunnel connecting planets i and j is added to the map. (Consequently each pair is connected independently with probability P.)
A map is connected if, between every pair of planets, there is a path made of one or more tunnels. Given N and P, compute the probability that this procedure generates a connected map.
The first line contains an integer N (1≤N≤20).
The second line contains a real number P (0≤P≤1).
Print, on a single line, the probability that the generated map is connected, rounded to exactly 6 digits after the decimal point (for example, 0.500000).