

import numpy as np

n,k=list(map(int,input().split()))

n_lis=[int(i) for i in range(1,n+1)]



p=float(1/n)

p_lis=[]



for i in range(n):

    count=0

    if n_lis[i]<k:

        atai=float(k/n_lis[i])



        for j in range(10000):

            atai=float(atai/2)

            count+=1



            if atai<=1:

                break

        

        p_lis.append((1/2)**(count))

    

    else:

        p_lis.append(1)



print((p*sum(p_lis)))



    
import math

n,k=list(map(int,input().split()))

n_lis=[int(i) for i in range(1,n+1)]

p=float(1/n)

p_lis=[]

for i in range(n):

    if n_lis[i]<k:

        atai=float(k/n_lis[i])

        kaisu=-(-math.log(atai,2)//1) # loop処理しなくてよいので記述が楽

        p_lis.append((1/2)**(kaisu))

    else:

        p_lis.append(1)



print((p*sum(p_lis)))
import numpy as np

n, k = list(map(int, input().split()))
n_lis = [int(i) for i in range(1, n + 1)]
p = float(1 / n)
p_lis = []
for i in range(n):
    count = 0
    if n_lis[i] < k:
        atai = float(k / n_lis[i])
        for j in range(10000):
            atai = float(atai / 2)
            count += 1
            if atai <= 1:
                break
        p_lis.append((1 / 2) ** (count))
    else:
        p_lis.append(1)
print((p * sum(p_lis)))

import math

n, k = list(map(int, input().split()))
n_lis = [int(i) for i in range(1, n + 1)]
p = float(1 / n)
p_lis = []
for i in range(n):
    if n_lis[i] < k:
        atai = float(k / n_lis[i])
        kaisu = -(-math.log(atai, 2) // 1)  # loop処理しなくてよいので記述が楽
        p_lis.append((1 / 2) ** (kaisu))
    else:
        p_lis.append(1)
print((p * sum(p_lis)))

-import numpy as np +import math -    count = 0 -        for j in range(10000): -            atai = float(atai / 2) -            count += 1 -            if atai <= 1: -                break -        p_lis.append((1 / 2) ** (count)) +        kaisu = -(-math.log(atai, 2) // 1)  # loop処理しなくてよいので記述が楽 +        p_lis.append((1 / 2) ** (kaisu))