#!/usr/bin/env python3 import functools p, c = map(int,input().split()) pe = sum([2,3,5,7,11,13]) / 6 ce = sum([4,6,8,9,10,12]) / 6 acc = functools.reduce(lambda x, y: x * y, ([pe] * p) + ([ce] * c)) print('{:.16f}'.format(acc))