def abc126c():
    import math
    n, k = map(int, input().split())
    ans = 0.0
    for i in range(1, n + 1):
        v = max(0, math.ceil(math.log2(k / i)))
        ans += math.pow(0.5, v)
    print(ans/n)


abc126c() def abc126c():
    import math
    n, k = map(int, input().split())
    ans = 0.0
    for i in range(1, n + 1):
        v = max(0, math.ceil(math.log2(k / i)))
        ans += math.pow(0.5, v)
    print(ans/n) abc126c import math math n, k = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split k ans = 0.0 ans 0.0 for i in range(1, n + 1):
        v = max(0, math.ceil(math.log2(k / i)))
        ans += math.pow(0.5, v)
     i range(1, n + 1) range 1 n + 1 n 1 v = max(0, math.ceil(math.log2(k / i))) v max(0, math.ceil(math.log2(k / i))) max 0 math.ceil(math.log2(k / i)) math.ceil math ceil math.log2(k / i) math.log2 math log2 k / i k i ans += math.pow(0.5, v) ans math.pow(0.5, v) math.pow math pow 0.5 v print(ans/n) print ans/n ans n abc126c() abc126c def abc126c():
    import math
    n, k = map(int, input().split())
    ans = 0.0
    for i in range(1, n + 1):
        v = max(0, math.ceil(math.log2(k / i)))
        ans += math.pow(0.5, v)
    print(ans/n) def abc126c():
    import math
    n, k = map(int, input().split())
    ans = 0.0
    for i in range(1, n + 1):
        v = max(0, math.ceil(math.log2(k / i)))
        ans += math.pow(0.5, v)
    print(ans/n) abc126c
def abc126c():
    import math
    n, k = map(int, input().split())
    ans = 0.0
    for i in range(1, n + 1):
        v = max(0, math.ceil(math.log2(k / i)))
        ans += math.pow(0.5, v)
    print(ans/n)


abc126c()