# coding=utf-8 import random N = int(input()) K = int(input()) result = [0, 0, 0] NUM = 10 ** 5 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, 6) if j < K: taro += random.randrange(4, 6) else: taro += random.randrange(1, 6) if taro > jiro: result[0] += 1 if taro < jiro: result[1] += 1 if taro == jiro: result[2] += 1 print(result[0]/NUM)