# -*- coding: utf-8 -*- import random P, C = map(int, raw_input().split()) primes = [2,3,5,7,11,13] composite = [4,6,8,9,10,12] total = 0 num = 1000000 for i in xrange(num): add = 1 for p in xrange(P): add *= random.choice(primes) for c in xrange(C): add *= random.choice(composite) total += add print "%.9f" % (1.0 * total / num)