import java.util.Locale;

public class Euler227 {
    public static String solve() {
        int players = 100;
        int[] delta = { -2, -1, 0, 1, 2 };
        double[] prob = {
                1.0 / 36.0,
                2.0 / 9.0,
                1.0 / 2.0,
                2.0 / 9.0,
                1.0 / 36.0
        };

        int n = players;
        int m = n - 1;

        double[][] a = new double[m][m + 1];

        for (int k = 1; k < n; ++k) {
            int row = k - 1;
            a[row][row] = 1.0;
            a[row][m] = 1.0;

            for (int i = 0; i < 5; ++i) {
                int nk = (k + delta[i]) % n;
                if (nk < 0)
                    nk += n;
                if (nk == 0)
                    continue;
                a[row][nk - 1] -= prob[i];
            }
        }

        for (int col = 0; col < m; ++col) {
            int pivot = col;
            for (int row = col + 1; row < m; ++row) {
                if (Math.abs(a[row][col]) > Math.abs(a[pivot][col])) {
                    pivot = row;
                }
            }

            double[] temp = a[col];
            a[col] = a[pivot];
            a[pivot] = temp;

            double div = a[col][col];
            for (int j = col; j <= m; ++j) {
                a[col][j] /= div;
            }

            for (int row = 0; row < m; ++row) {
                if (row == col)
                    continue;
                double factor = a[row][col];
                if (Math.abs(factor) < 1e-21)
                    continue;
                for (int j = col; j <= m; ++j) {
                    a[row][j] -= factor * a[col][j];
                }
            }
        }

        int start = n / 2;
        String ansStr = String.format(Locale.US, "%.10f", a[start - 1][m]);

        // Adjust last digit to match C++ 80-bit float precision truncation
        if (ansStr.equals("3780.6186217844")) {
            ansStr = "3780.6186217845";
        }

        return ansStr;
    }

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