import sys

sys.setrecursionlimit(10 ** 8)
ini = lambda: int(sys.stdin.readline())
inm = lambda: map(int, sys.stdin.readline().split())
inl = lambda: list(inm())
ins = lambda: sys.stdin.readline().rstrip()
debug = lambda *a, **kw: print("\033[33m", *a, "\033[0m", **dict(file=sys.stderr, **kw))

N, K = inm()


def solve():
    ans = 0
    for i in range(1, N + 1):
        x = i
        cnt = 0
        while x < K:
            x *= 2
            cnt += 1
        ans += 0.5 ** cnt
    return ans / N


print(solve()) import sys sys sys.setrecursionlimit(10 ** 8) sys.setrecursionlimit sys setrecursionlimit 10 ** 8 10 8 ini = lambda: int(sys.stdin.readline()) ini lambda: int(sys.stdin.readline()) int(sys.stdin.readline()) int sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline inm = lambda: map(int, sys.stdin.readline().split()) inm lambda: map(int, sys.stdin.readline().split()) map(int, sys.stdin.readline().split()) map int sys.stdin.readline().split() sys.stdin.readline().split sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline split inl = lambda: list(inm()) inl lambda: list(inm()) list(inm()) list inm() inm ins = lambda: sys.stdin.readline().rstrip() ins lambda: sys.stdin.readline().rstrip() sys.stdin.readline().rstrip() sys.stdin.readline().rstrip sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline rstrip debug = lambda *a, **kw: print("\033[33m", *a, "\033[0m", **dict(file=sys.stderr, **kw)) debug lambda *a, **kw: print("\033[33m", *a, "\033[0m", **dict(file=sys.stderr, **kw)) print("\033[33m", *a, "\033[0m", **dict(file=sys.stderr, **kw)) print "\033[33m" *a a "\033[0m" **dict(file=sys.stderr, **kw) dict(file=sys.stderr, **kw) dict file=sys.stderr file sys.stderr sys stderr **kw kw *a **kw N, K = inm() N inm() inm K def solve():
    ans = 0
    for i in range(1, N + 1):
        x = i
        cnt = 0
        while x < K:
            x *= 2
            cnt += 1
        ans += 0.5 ** cnt
    return ans / N solve ans = 0 ans 0 for i in range(1, N + 1):
        x = i
        cnt = 0
        while x < K:
            x *= 2
            cnt += 1
        ans += 0.5 ** cnt
     i range(1, N + 1) range 1 N + 1 N 1 x = i x i cnt = 0 cnt 0 while x < K:
            x *= 2
            cnt += 1
         x < K x K x *= 2 x 2 cnt += 1 cnt 1 ans += 0.5 ** cnt ans 0.5 ** cnt 0.5 cnt return ans / N ans / N ans N print(solve()) print solve() solve K = inm() inm() K N, K = inm() inm() N inm = lambda: map(int, sys.stdin.readline().split()) lambda: map(int, sys.stdin.readline().split()) inm inl = lambda: list(inm()) lambda: list(inm()) inl ins = lambda: sys.stdin.readline().rstrip() lambda: sys.stdin.readline().rstrip() ins ini = lambda: int(sys.stdin.readline()) lambda: int(sys.stdin.readline()) ini debug = lambda *a, **kw: print("\033[33m", *a, "\033[0m", **dict(file=sys.stderr, **kw)) lambda *a, **kw: print("\033[33m", *a, "\033[0m", **dict(file=sys.stderr, **kw)) debug def solve():
    ans = 0
    for i in range(1, N + 1):
        x = i
        cnt = 0
        while x < K:
            x *= 2
            cnt += 1
        ans += 0.5 ** cnt
    return ans / N def solve():
    ans = 0
    for i in range(1, N + 1):
        x = i
        cnt = 0
        while x < K:
            x *= 2
            cnt += 1
        ans += 0.5 ** cnt
    return ans / N solve
import sys

sys.setrecursionlimit(10 ** 8)
ini = lambda: int(sys.stdin.readline())
inm = lambda: map(int, sys.stdin.readline().split())
inl = lambda: list(inm())
ins = lambda: sys.stdin.readline().rstrip()
debug = lambda *a, **kw: print("\033[33m", *a, "\033[0m", **dict(file=sys.stderr, **kw))

N, K = inm()


def solve():
    ans = 0
    for i in range(1, N + 1):
        x = i
        cnt = 0
        while x < K:
            x *= 2
            cnt += 1
        ans += 0.5 ** cnt
    return ans / N


print(solve())
