#!/usr/bin/python a = [2, 3, 5, 7, 11, 13] b = [4, 6, 8, 9, 10, 12] from itertools import product from collections import defaultdict p, c = map(int, raw_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))