void main() {
    int[] tmp = readln.split.to!(int[]);
    int n = tmp[0], k = tmp[1];
    double prob = 1.0 / n;
    double ans = 0.0;
    foreach (i; 1 .. n+1) {
        ans += prob * 0.5 ^^ max(0, ceil(log2(k.to!double / i)));
    }
    writefln("%.12f", ans);
}

import std.stdio;
import std.string;
import std.array;
import std.conv;
import std.algorithm;
import std.range;
import std.math;
import std.container;
import std.typecons;