import java.util.*; public class Main { public static void main(String[] args) { Scanner sc=new Scanner(System.in); int n=sc.nextInt(); int k=sc.nextInt(); double dp[][]=new double [n+1][n*6+1]; double dp2[][]=new double[n+1][n*6+1]; Arrays.fill(dp[0],0); Arrays.fill(dp2[0],0); dp[0][0]=1; dp2[0][0]=1; for(int i=1;i<=n;i++){ for(int j=0;j=0){ dp[i][j]+=dp[i-1][p]/6; } } if(i<=k){ for(int p=j-6;p=0)dp2[i][j]+=dp2[i-1][p]/3; } } else{ for(int p=j-6;p=0){ dp2[i][j]+=dp2[i-1][p]/6; } } } } } double ans=0; for(int i=0;i