import sys

read = sys.stdin.buffer.read

readline = sys.stdin.buffer.readline

readlines = sys.stdin.buffer.readlines



import numpy as np



N,K = list(map(int,read().split()))



x = np.arange(1,N+1,dtype=np.int64)

need = np.zeros(N,dtype=np.int32)



for _ in range(20):

    target = (x <= K-1)

    x[target] <<= 1

    need[target] += 1



counter = np.bincount(need,minlength=20)

power = np.full(20,1/2,dtype=np.float64); power[0] = 1; np.cumprod(power,out=power)



answer = (counter * power).sum() / N

print(answer)
import sys



read = sys.stdin.buffer.read

readline = sys.stdin.buffer.readline

readlines = sys.stdin.buffer.readlines



N, K = list(map(int, read().split()))



dp = [1.0] * (200_010)

for n in range(K - 1, 0, -1):

    dp[n] = 0.5 * dp[2 * n]



print((sum(dp[1:N + 1]) / N))
import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
import numpy as np

N, K = list(map(int, read().split()))
x = np.arange(1, N + 1, dtype=np.int64)
need = np.zeros(N, dtype=np.int32)
for _ in range(20):
    target = x <= K - 1
    x[target] <<= 1
    need[target] += 1
counter = np.bincount(need, minlength=20)
power = np.full(20, 1 / 2, dtype=np.float64)
power[0] = 1
np.cumprod(power, out=power)
answer = (counter * power).sum() / N
print(answer)

import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
N, K = list(map(int, read().split()))
dp = [1.0] * (200_010)
for n in range(K - 1, 0, -1):
    dp[n] = 0.5 * dp[2 * n]
print((sum(dp[1 : N + 1]) / N))

-import numpy as np - -x = np.arange(1, N + 1, dtype=np.int64) -need = np.zeros(N, dtype=np.int32) -for _ in range(20): -    target = x <= K - 1 -    x[target] <<= 1 -    need[target] += 1 -counter = np.bincount(need, minlength=20) -power = np.full(20, 1 / 2, dtype=np.float64) -power[0] = 1 -np.cumprod(power, out=power) -answer = (counter * power).sum() / N -print(answer) +dp = [1.0] * (200_010) +for n in range(K - 1, 0, -1): +    dp[n] = 0.5 * dp[2 * n] +print((sum(dp[1 : N + 1]) / N))