P,C = map(int,raw_input().split(" ")) dice1 = [2,3,5,7,11,13] dice2 = [4,6,8,9,10,12] """ def calc(dice,n): def nyrn(i): if i==0: return [1] else: r = nyrn(i-1) ret = [] for rr in r: for d in dice: ret.append(rr * d/6.0) return ret return nyrn(n) """ ca = sum(dice1)**P / float(6**P) cb = sum(dice2)**C / float(6**C) """ ans = 0 for a in ca: for b in cb: ans += a*b """ print ca*cb