import random N = int(input()) K = int(input()) result = [0, 0, 0] NUM = (10 ** 5) * 2 table = ([1] * K) + ([0] * (N-K)) random.seed() for i in range(NUM): taro = 0 jiro = 0 for j in range(N): jiro += random.randrange(1, 7) if random.sample(table, 1) == [1]: taro += random.randrange(4, 7) else: taro += random.randrange(1, 7) if taro > jiro: result[0] += 1 if taro < jiro: result[1] += 1 if taro == jiro: result[2] += 1 print(result[0]/NUM)