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

int main() {
    double n,k;
    cin >> n >> k;
    double sum = 0;
    double base = 1/n;
    for(int i = 1; i <= n; i++){
        sum = sum + base * min(1.0,pow(0.5, ceil(log2(k/i))));
    }
    cout << fixed << setprecision(15) << sum;
}
