import std.stdio, std.array, std.string, std.conv, std.algorithm;
import std.typecons, std.range, std.random, std.math, std.container;
import std.numeric, std.bigint, core.bitop, core.stdc.string;

void main() {
    auto s = readln.split.map!(to!long);
    auto N = s[0];
    auto K = s[1];
    real ans = 0;

    foreach (i; 1..N+1) {
        long x = i;
        int tmp = 0;
        while (x < K) {
            x *= 2;
            tmp += 1;
        }
        ans += 1.0L / (1L << tmp) / N;
    }

    writefln("%.15f", ans);
}
