#!/usr/bin/env python3 p, c = map(int, input().split()) dice_p = [ 2,3,5,7,11,13 ] dice_c = [ 4,6,8,9,10,12 ] ans = pow(sum(dice_p)/6, p) * pow(sum(dice_c)/6, c) print('%.12f' % ans)