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