import java.util.*; import java.io.*; public class Main { public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String[] first = br.readLine().split(" ", 2); int p = Integer.parseInt(first[0]); int c = Integer.parseInt(first[1]); int[] pArr = new int[]{2,3,5,7,11,13}; int[] cArr = new int[]{4,6,8,9,10,12}; double pEx = 0; double cEx = 0; for (int i = 0; i < 6; i++) { pEx += pArr[i] / 6.0; cEx += cArr[i] / 6.0; } System.out.println(Math.pow(pEx, p) * Math.pow(cEx, c)); } }