import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int P = scan.nextInt(); int C = scan.nextInt(); scan.close(); int []p = {2, 3, 5 ,7, 11, 13}; int []c = {4, 6, 8 ,9, 10, 12}; double k1 = 0; double k2 = 0; for(int i = 0; i < 6; i++) { k1 += p[i]; k2 += c[i]; } k1 = k1 / 6.0; k2 = k2 / 6.0; double ans = Math.pow(k1, P) * Math.pow(k2, C); System.out.println(ans); } }