#include <bits/stdc++.h>
using namespace std;

signed main(){
  int N, K; cin >> N >> K;
  const int trial = ( int ) 1e7;
  int win_cnt = 0;
  for( int i = 0; i < trial; ++i ){
    int nirou = 0;
    for( int j = 0; j < N; ++j )
      nirou += rand() % 6 + 1;
    int tarou = 0;
    for( int j = 0; j < N - K; ++j )
      tarou += rand() % 6 + 1;
    for( int j = 0; j < K; ++j )
      tarou += rand() % 3 + 4;
    win_cnt += tarou > nirou;
  }
  cout << fixed << setprecision( 6 ) << 1.0 * win_cnt / trial << endl;
  return 0;
}