#!/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 res = sum(reduce(mul, s) for s in product(*L)) print float(res) / (6**(p+c))