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 = 1.0 for i in range(P): ans *= ep for i in range(C): ans *= ec print('%.10f' % ans)