public class Euler911 {

    static boolean isPowerOfTwo(int n) {
        return n > 0 && (n & (n - 1)) == 0;
    }

    static boolean isOneLessThanPowerOfTwo(int n) {
        return n >= 1 && ((n + 1) & n) == 0;
    }

    static int highestPowerOfTwoAtMost(int n) {
        int p = 1;
        while ((p << 1) <= n) {
            p <<= 1;
        }
        return p;
    }

    static double logKInfty(int n) {
        if (n == 0) {
            return (Math.log(2) + 2 * Math.log(4) + Math.log(6)) / 4.0;
        }

        long b = (1L << n) - 1;

        if (isOneLessThanPowerOfTwo(n)) {
            return (Math.log(2) + 2 * Math.log(b)) / 5.0;
        }

        if (isPowerOfTwo(n)) {
            return Math.log(b) / 2.0 + (Math.log(b - 1) + Math.log(b + 1)) / 12.0;
        }

        int p = highestPowerOfTwoAtMost(n);
        int q = p << 1;
        int e = q - n;
        long c = (1L << e) - 1;

        return Math.log(b) / 3.0 + Math.log(c) / 6.0 + (Math.log(c - 1) + Math.log(c + 1)) / 12.0;
    }

    public static String solve() {
        double sumLogs = 0.0;
        for (int n = 0; n <= 50; ++n) {
            sumLogs += logKInfty(n);
        }

        double ans = Math.exp(sumLogs / 51.0);
        return String.format(java.util.Locale.US, "%.6f", ans);
    }

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