package no352; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); System.out.printf("%.7f\n",solve(n)); } public static double solve(int n) { double[] fact = new double[n+1]; fact[0] = 1; for(int i=1;i<=n;i++) { fact[i] = fact[i-1] * i; } double sum = 0; for(int i=1;i<=n;i++) { for(int j=i+1;j<=n;j++) { int m = n - Math.max(i,j); double pattern = 0; for(int k=1;k<=m;k++) { pattern += fact[m] / fact[m-k] * fact[n-k-1] * 2; } sum += pattern * (i * j - 1) / fact[n]; } } sum += n; return sum; } }