import sys
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))  #空白あり

N,K = LI()

prob = []
for i in range(1,N+1):
    if i >= K:
        prob.append(1)
    else:
        a = 0
        while i*2**a < K:
            a += 1
        prob.append(1/2**a)

print(sum(prob)/N) import sys sys def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))  #空白あり LI N,K = LI() N LI() LI K prob = [] prob [] for i in range(1,N+1):
    if i >= K:
        prob.append(1)
    else:
        a = 0
        while i*2**a < K:
            a += 1
        prob.append(1/2**a) i range(1,N+1) range 1 N+1 N 1 if i >= K:
        prob.append(1)
    else:
        a = 0
        while i*2**a < K:
            a += 1
        prob.append(1/2**a) i >= K i K prob.append(1) prob.append prob append 1 a = 0 a 0 while i*2**a < K:
            a += 1
         i*2**a < K i*2**a i 2**a 2 a K a += 1 a 1 prob.append(1/2**a) prob.append prob append 1/2**a 1 2**a 2 a print(sum(prob)/N) print sum(prob)/N sum(prob) sum prob N def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))  #空白あり def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))  #空白あり LI N,K = LI() LI() N prob = [] [] prob K = LI() LI() K a = 0 0 a a += 1 1 a
import sys
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))  #空白あり

N,K = LI()

prob = []
for i in range(1,N+1):
    if i >= K:
        prob.append(1)
    else:
        a = 0
        while i*2**a < K:
            a += 1
        prob.append(1/2**a)

print(sum(prob)/N)