P, C = list(map(float, input().split())) exp = sum([2, 3, 5, 7, 11, 13]) / 6 exc = sum([4, 6, 8, 9, 10, 12]) / 6 if P == 0: print(exc ** C) elif C == 0: print(exp ** P) else: print(exp ** P * exc ** C)