P, C = map(int, raw_input().split()) ep = sum([2,3,5,7,11,13])/6.0 ec = sum([4,6,8,9,10,12])/6.0 ans = ep ** P * ec ** C print('%.10f' % ans)