from math import log,exp

P,C=map(int,input().split())

A=[2,3,5,7,11,13]
B=[4,6,8,9,10,12]

print((sum(A)**P*sum(B)**C)/(6**(P+C)))