import sys
def MI(): return map(int,sys.stdin.readline().rstrip().split())


N,K = MI()
ans = 0
for i in range(1,N+1):
    r = 0
    while i <= K-1:
        i *= 2
        r += 1
    ans += 1/(N*2**r)

print(ans) import sys sys def MI(): return map(int,sys.stdin.readline().rstrip().split()) MI N,K = MI() N MI() MI K ans = 0 ans 0 for i in range(1,N+1):
    r = 0
    while i <= K-1:
        i *= 2
        r += 1
    ans += 1/(N*2**r) i range(1,N+1) range 1 N+1 N 1 r = 0 r 0 while i <= K-1:
        i *= 2
        r += 1
     i <= K-1 i K-1 K 1 i *= 2 i 2 r += 1 r 1 ans += 1/(N*2**r) ans 1/(N*2**r) 1 N*2**r N 2**r 2 r print(ans) print ans N,K = MI() MI() N K = MI() MI() K ans += 1/(N*2**r) 1/(N*2**r) ans def MI(): return map(int,sys.stdin.readline().rstrip().split()) def MI(): return map(int,sys.stdin.readline().rstrip().split()) MI r = 0 0 r ans = 0 0 ans r += 1 1 r i *= 2 2 i
import sys
def MI(): return map(int,sys.stdin.readline().rstrip().split())


N,K = MI()
ans = 0
for i in range(1,N+1):
    r = 0
    while i <= K-1:
        i *= 2
        r += 1
    ans += 1/(N*2**r)

print(ans)
