#!/usr/bin/python from itertools import product from collections import defaultdict from functools import reduce a = [2, 3, 5, 7, 11, 13] b = [4, 6, 8, 9, 10, 12] p, c = map(int, input().split()) L = [a] * p + [b] * c pro1 = defaultdict(int) for s in product(*L): pro1[reduce(lambda a, b: a*b, s)] += 1 res = sum(k*v for k, v in pro1.items()) print(float(res) / (6**(p+c)))