package no242; import java.util.Scanner; public class Main { static double[][] c = new double[100][100]; static int[] bingo = { 0b00000_00000_00000_00000_11111, 0b00000_00000_00000_11111_00000, 0b00000_00000_11111_00000_00000, 0b00000_11111_00000_00000_00000, 0b11111_00000_00000_00000_00000, 0b00001_00001_00001_00001_00001, 0b00010_00010_00010_00010_00010, 0b00100_00100_00100_00100_00100, 0b01000_01000_01000_01000_01000, 0b10000_10000_10000_10000_10000, 0b00001_00010_00100_01000_10000, 0b10000_01000_00100_00010_00001, }; public static double[] magic = {-1,0.0000000000,0.0000000000,0.0000000000,0.0000000000,0.0000001678,0.0000010067,0.0000035233,0.0000093956,0.0000211400,0.0000422800,0.0000775134,0.0001328801,0.0002159301,0.0003358913,0.0005038369,0.0007328537,0.0010382094,0.0014375207,0.0019509209,0.0026012279,0.0034141117,0.0044182622,0.0056455572,0.0071312301,0.0089140377,0.0110364276,0.0135447066,0.0164892080,0.0199244597,0.0239093516,0.0285073039,0.0337864342,0.0398197260,0.0466851961,0.0544660621,0.0632509108,0.0731338656,0.0842147543,0.0965992770,0.1103991737,0.1257323923,0.1427232561,0.1615026319,0.1822080976,0.2049841098,0.2299821719,0.2573610019,0.2872866998,0.3199329157,0.3554810174,0.3941202585,0.4360479455,0.4814696065,0.5305991582,0.5836590741,0.6408805518,0.7025036819,0.7687776142,0.8399607265,0.9163207927,0.9981351491,1.0856908639,1.1792849039,1.2792243026,1.3858263278,1.4994186497,1.6203395086,1.7489378823,1.8855736543,2.0306177815,2.1844524621,2.3474713024,2.5200794865,2.7026939420,2.8957435092,3.0996691084,3.3149239076,3.5419734904,3.7812960237,4.0333824251,4.2987365321,4.5778752679,4.8713288107,5.1796407607,5.5033683083,5.8430824014,6.1993679137,6.5728238121,6.9640633248,7.3737141086,7.8024184172,8.2508332687,8.7196306136,9.2094975020,9.7211362521,10.2552646176,10.8126159555,11.3939393939,12.0000000000, }; public static void main(String[] args) { combInit(); Scanner sc = new Scanner(System.in); // int n = sc.nextInt(); // System.out.println(solve(n)); // for(int i=1;i<=99;i++) { // System.out.println(String.format("%.10f", solve(i))); // } System.out.println(String.format("%.10f", magic[sc.nextInt()])); } public static double solve(int n) { double nncn = comb(99,n); double ans = 0; for(int i=0;i<(1<<25);i++) { int bc = Integer.bitCount(i); if (bc > n) { continue; } int count = 0; for(int j=0;j