import math
N, K = map(int, input().split())
p = 0
if N >= K:
    p += N - K + 1
    for r in range(1, K):
        p += (1 / 2) ** math.ceil(math.log2(K / r))
else:
    for r in range(1, N + 1):
        p += (1 / 2) ** math.ceil(math.log2(K / r))
print(p / N) import math math N, K = map(int, input().split()) N map(int, input().split()) map int input().split() ().split () input split K p = 0 p 0 if N >= K:
    p += N - K + 1
    for r in range(1, K):
        p += (1 / 2) ** math.ceil(math.log2(K / r))
else:
    for r in range(1, N + 1):
        p += (1 / 2) ** math.ceil(math.log2(K / r)) N >= K N K p += N - K + 1 p N - K + 1 N - K N K 1 for r in range(1, K):
        p += (1 / 2) ** math.ceil(math.log2(K / r)) r range(1, K) range 1 K p += (1 / 2) ** math.ceil(math.log2(K / r)) p (1 / 2) ** math.ceil(math.log2(K / r)) 1 / 2 1 2 math.ceil(math.log2(K / r)) math.ceil math ceil math.log2(K / r) math.log2 math log2 K / r K r for r in range(1, N + 1):
        p += (1 / 2) ** math.ceil(math.log2(K / r)) r range(1, N + 1) range 1 N + 1 N 1 p += (1 / 2) ** math.ceil(math.log2(K / r)) p (1 / 2) ** math.ceil(math.log2(K / r)) 1 / 2 1 2 math.ceil(math.log2(K / r)) math.ceil math ceil math.log2(K / r) math.log2 math log2 K / r K r print(p / N) print p / N p N p = 0 0 p K = map(int, input().split()) map(int, input().split()) K N, K = map(int, input().split()) map(int, input().split()) N p += N - K + 1 N - K + 1 p p += (1 / 2) ** math.ceil(math.log2(K / r)) (1 / 2) ** math.ceil(math.log2(K / r)) p p += (1 / 2) ** math.ceil(math.log2(K / r)) (1 / 2) ** math.ceil(math.log2(K / r)) p
import math
N, K = map(int, input().split())
p = 0
if N >= K:
    p += N - K + 1
    for r in range(1, K):
        p += (1 / 2) ** math.ceil(math.log2(K / r))
else:
    for r in range(1, N + 1):
        p += (1 / 2) ** math.ceil(math.log2(K / r))
print(p / N)