public class Euler740 {
    static class Solver {
        int n;
        int dim;
        double[] memo;
        byte[] seen;

        Solver(int n) {
            this.n = n;
            this.dim = n + 1;
            int total = (n + 1) * 3 * 3 * dim * dim;
            memo = new double[total];
            seen = new byte[total];
        }

        int index(int i, int x, int y, int a1, int a2) {
            return ((((i * 3 + x) * 3 + y) * dim + a1) * dim) + a2;
        }

        static int[] applyDraw(int cat, int g, int yv, int a1, int a2) {
            if (cat == 0)
                g--;
            else if (cat == 1)
                yv--;
            else if (cat == 2)
                a1--;
            else {
                a2--;
                a1++;
            }
            return new int[] { g, yv, a1, a2 };
        }

        static int countForCat(int cat, int g, int yv, int c1, int c2) {
            if (cat == 0)
                return g;
            if (cat == 1)
                return yv;
            if (cat == 2)
                return c1;
            return 2 * c2;
        }

        double solveDfs(int i, int x, int y, int a1, int a2) {
            if (i == n) {
                return (y > 0) ? 1.0 : 0.0;
            }

            int id = index(i, x, y, a1, a2);
            if (seen[id] != 0) {
                return memo[id];
            }
            seen[id] = 1;

            int futurePool = n - i - 1;
            int totalSlips = 2 * (n - i + 1);
            int g0 = totalSlips - x - y - a1 - 2 * a2;
            int avail0 = totalSlips - x;

            double ans = 0.0;

            for (int c1 = 0; c1 < 4; ++c1) {
                int cnt1 = countForCat(c1, g0, y, a1, a2);
                if (cnt1 <= 0)
                    continue;

                double p1 = (double) cnt1 / avail0;
                int[] state1 = applyDraw(c1, g0, y, a1, a2);
                int g1 = state1[0], y1 = state1[1], a11 = state1[2], a21 = state1[3];

                int avail1 = avail0 - 1;
                for (int c2 = 0; c2 < 4; ++c2) {
                    int cnt2 = countForCat(c2, g1, y1, a11, a21);
                    if (cnt2 <= 0)
                        continue;

                    double p2 = (double) cnt2 / avail1;
                    int[] state2 = applyDraw(c2, g1, y1, a11, a21);
                    int g2 = state2[0], y2 = state2[1], a12 = state2[2], a22 = state2[3];

                    double cont = 0.0;
                    if (i == n - 1) {
                        cont = (y2 > 0) ? 1.0 : 0.0;
                    } else {
                        int b1 = a12;
                        int b2 = a22;
                        int b0 = futurePool - b1 - b2;

                        if (b0 > 0) {
                            double ps = (double) b0 / futurePool;
                            cont += ps * solveDfs(i + 1, 0, y2, b1, b2);
                        }
                        if (b1 > 0) {
                            double ps = (double) b1 / futurePool;
                            cont += ps * solveDfs(i + 1, 1, y2, b1 - 1, b2);
                        }
                        if (b2 > 0) {
                            double ps = (double) b2 / futurePool;
                            cont += ps * solveDfs(i + 1, 2, y2, b1, b2 - 1);
                        }
                    }

                    ans += p1 * p2 * cont;
                }
            }

            memo[id] = ans;
            return ans;
        }
    }

    public static String solve() {
        Solver solver = new Solver(100);
        double ans = solver.solveDfs(1, 2, 2, 0, 98);
        return String.format(java.util.Locale.US, "%.10f", ans);
    }

    public static void main(String[] args) {
        System.out.println(solve());
    }
}
