prime = [2,3,5,7,11,13] compo = [4,6,8,9,10,12] P, C = map(int, raw_input().split()) def multi(list1, list2): return [item1 * item2 for item1 in list1 for item2 in list2] dice = [1]*6 for loop in xrange(P): dice = multi(dice, prime) for loop in xrange(C): dice = multi(dice, compo) exp = 1.0 * sum(dice) / len(dice) print exp