P, C = map(int, input().split()) xs = [2, 3, 5, 7, 11, 13] ys = [4, 6, 8, 9, 10, 12] def f(a): res = 0 for x in a: res += x / len(a) return res ans = f(xs) ** P * f(ys) ** C print(ans)