import sys read = sys.stdin.read readline = sys.stdin.readline readlines = sys.stdin.readlines import random n, K = map(int, read().split()) ITER = 10**6 cnt = 0 for _ in range(ITER): taro, jiro = 0, 0 for i in range(n-K): taro += random.randint(1, 6) for i in range(K): taro += random.randint(4, 6) for i in range(n): jiro += random.randint(1, 6) if taro > jiro: cnt += 1 print(cnt / ITER)