from functools import reduce from operator import mul from itertools import product, permutations, combinations, accumulate, cycle, combinations_with_replacement from string import ascii_uppercase, ascii_lowercase, ascii_letters, digits, hexdigits, octdigits prod = lambda l: reduce(mul, l, 1) prodmod = lambda l, mod: reduce(lambda x, y: mul(x,y)%mod, l) P, C = map(int, input().split()) saikoro = {} for i in product([2,3,5,7,11,13], repeat=P): for j in product([4,6,8,9,10,12], repeat=C): p = prod(i)*prod(j) saikoro[p] = saikoro.get(p, 0) + 1 ans = 0 for key, cnt in saikoro.items(): ans += key * cnt / (6**(P+C)) print(ans)