P,C = map(int,raw_input().split()) dice1 = [2, 3, 5, 7, 11, 13] dice2 = [4, 6, 8, 9, 10, 12] res = 0 res1 = 0 res2 = 0 for i in dice1: res1 += i * (1/ 6.0) res1 = res1 ** P for i in dice2: res2 += i * (1/ 6.0) res2 = res2 ** C res = res1 * res2 print ("%.20lf" % res )