import math
N, K = list(map(int, input().split()))
res = 0
for i in range(1, min(N + 1, K)):
    res += math.pow(0.5, math.ceil(math.log2(math.ceil(K / i)))) / N
print(f'{res + max(0, (N - K + 1) / N):.10f}') import math math N, K = list(map(int, input().split())) N list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split K res = 0 res 0 for i in range(1, min(N + 1, K)):
    res += math.pow(0.5, math.ceil(math.log2(math.ceil(K / i)))) / N i range(1, min(N + 1, K)) range 1 min(N + 1, K) min N + 1 N 1 K res += math.pow(0.5, math.ceil(math.log2(math.ceil(K / i)))) / N res math.pow(0.5, math.ceil(math.log2(math.ceil(K / i)))) / N math.pow(0.5, math.ceil(math.log2(math.ceil(K / i)))) math.pow math pow 0.5 math.ceil(math.log2(math.ceil(K / i))) math.ceil math ceil math.log2(math.ceil(K / i)) math.log2 math log2 math.ceil(K / i) math.ceil math ceil K / i K i N print(f'{res + max(0, (N - K + 1) / N):.10f}') print f'{res + max(0, (N - K + 1) / N):.10f}' N, K = list(map(int, input().split())) list(map(int, input().split())) N res = 0 0 res res += math.pow(0.5, math.ceil(math.log2(math.ceil(K / i)))) / N math.pow(0.5, math.ceil(math.log2(math.ceil(K / i)))) / N res K = list(map(int, input().split())) list(map(int, input().split())) K
import math
N, K = list(map(int, input().split()))
res = 0
for i in range(1, min(N + 1, K)):
    res += math.pow(0.5, math.ceil(math.log2(math.ceil(K / i)))) / N
print(f'{res + max(0, (N - K + 1) / N):.10f}')
