P = int(raw_input().split(' ')[0]) C = int(raw_input().split(' ')[1]) sosu = [2,3,5,7,11,13] gouseisu = [4,6,8,9,10,12] s_num = 1.0 g_num = 1.0 for s in sosu: s_num = s_num * s s_num /= 6 for g in gouseisu: g_num = g_num * g g_num /= 6 if P == 0: P = 1 if C == 0: C = 1 output = s_num * P * g_num * C print output