import sys


inint = lambda: int(sys.stdin.readline())
inintm = lambda: map(int, sys.stdin.readline().split())
inintl = lambda: list(inintm())
instrm = lambda: map(str, sys.stdin.readline().split())
instrl = lambda: list(instrm())

n, k = inintm()

ans = 0

for i in range(1,n+1):
    b = 0
    for _ in range(1,18):
        if i >= k:
            break
        i *= 2
        b += 1
    ans += (1/n)*(0.5**b)

print(ans) import sys sys inint = lambda: int(sys.stdin.readline()) inint lambda: int(sys.stdin.readline()) int(sys.stdin.readline()) int sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline inintm = lambda: map(int, sys.stdin.readline().split()) inintm 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 inintl = lambda: list(inintm()) inintl lambda: list(inintm()) list(inintm()) list inintm() inintm instrm = lambda: map(str, sys.stdin.readline().split()) instrm lambda: map(str, sys.stdin.readline().split()) map(str, sys.stdin.readline().split()) map str sys.stdin.readline().split() sys.stdin.readline().split sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline split instrl = lambda: list(instrm()) instrl lambda: list(instrm()) list(instrm()) list instrm() instrm n, k = inintm() n inintm() inintm k ans = 0 ans 0 for i in range(1,n+1):
    b = 0
    for _ in range(1,18):
        if i >= k:
            break
        i *= 2
        b += 1
    ans += (1/n)*(0.5**b) i range(1,n+1) range 1 n+1 n 1 b = 0 b 0 for _ in range(1,18):
        if i >= k:
            break
        i *= 2
        b += 1
     _ range(1,18) range 1 18 if i >= k:
            break
         i >= k i k break i *= 2 i 2 b += 1 b 1 ans += (1/n)*(0.5**b) ans (1/n)*(0.5**b) 1/n 1 n 0.5**b 0.5 b print(ans) print ans inintl = lambda: list(inintm()) lambda: list(inintm()) inintl inintm = lambda: map(int, sys.stdin.readline().split()) lambda: map(int, sys.stdin.readline().split()) inintm k = inintm() inintm() k instrl = lambda: list(instrm()) lambda: list(instrm()) instrl i *= 2 2 i inint = lambda: int(sys.stdin.readline()) lambda: int(sys.stdin.readline()) inint instrm = lambda: map(str, sys.stdin.readline().split()) lambda: map(str, sys.stdin.readline().split()) instrm b += 1 1 b b = 0 0 b ans += (1/n)*(0.5**b) (1/n)*(0.5**b) ans n, k = inintm() inintm() n ans = 0 0 ans
import sys


inint = lambda: int(sys.stdin.readline())
inintm = lambda: map(int, sys.stdin.readline().split())
inintl = lambda: list(inintm())
instrm = lambda: map(str, sys.stdin.readline().split())
instrl = lambda: list(instrm())

n, k = inintm()

ans = 0

for i in range(1,n+1):
    b = 0
    for _ in range(1,18):
        if i >= k:
            break
        i *= 2
        b += 1
    ans += (1/n)*(0.5**b)

print(ans)
