using System;
using System.Collections.Generic;
using System.Linq;
using static System.Console;
class Program
{
    static void Main()
    {
        var N = int.Parse(ReadLine());
        var K = int.Parse(ReadLine());
        Span<int> t = stackalloc int[] { 4, 4, 5, 5, 6, 6 };
        var s = 0.0;
        var r = new XorShift();
        var l = 1000000;
        for (int i = 0; i < l; i++)
        {
            var ts = 0;
            var js = 0;
            for (int k = 0; k < N - K; k++) ts += r.Next(6) + 1;
            for (int k = 0; k < K; k++) ts += t[r.Next(6)];
            for (int k = 0; k < N; k++) js += r.Next(6) + 1;


            if (ts > js) s++;
        }
        WriteLine(s / l);
    }
}

class XorShift
{
    uint x = 123456789;
    uint y = 362436069;
    uint z = 521288629;
    uint w = 88675123;

    public XorShift()
    {
        var t = (uint)Environment.TickCount;
        x ^= t;
        y ^= Shift(t, 17);
        z ^= Shift(t, 31);
        w ^= Shift(t, 18);
    }

    uint Shift(uint u, int n) => u << n | u >> 32 - n;

    public int Next()
    {
        var t = x ^ x << 11;
        x = y; y = z; z = w;
        t = w = w ^ w >> 19 ^ t ^ t >> 8;
        if (t > int.MaxValue) t = ~t;
        return (int)(t == int.MaxValue ? --t : t);
    }

    public int Next(int maxValue) => (int)(NextDouble() * maxValue);

    public double NextDouble() => (double)Next() / int.MaxValue;
}