#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { int n,k; cin>>n>>k; int wins=0; for (int i=0;i<1e6;i++) { int taro=0; int jiro=0; for (int j=0;j<k;j++) taro += 4+rand()%3; for (int j=0;j<n-k;j++) taro += 1+rand()%6; for (int j=0;j<n;j++) jiro += 1+rand()%6; if (taro > jiro) wins++; } cout<<fixed<<wins/1e6<<endl; return 0; }