from math import ceil, log2

n, k = map(int, input().split())
ans = sum(1 / 2 ** ceil(log2(k / i)) for i in range(1, min(n, k) + 1))
print((ans + max(0, n - k)) / n) from math import ceil, log2 n, k = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split k ans = sum(1 / 2 ** ceil(log2(k / i)) for i in range(1, min(n, k) + 1)) ans sum(1 / 2 ** ceil(log2(k / i)) for i in range(1, min(n, k) + 1)) sum 1 / 2 ** ceil(log2(k / i)) 1 2 ** ceil(log2(k / i)) 2 ceil(log2(k / i)) ceil log2(k / i) log2 k / i k i print((ans + max(0, n - k)) / n) print (ans + max(0, n - k)) / n ans + max(0, n - k) ans max(0, n - k) max 0 n - k n k n n, k = map(int, input().split()) map(int, input().split()) n k = map(int, input().split()) map(int, input().split()) k ans = sum(1 / 2 ** ceil(log2(k / i)) for i in range(1, min(n, k) + 1)) sum(1 / 2 ** ceil(log2(k / i)) for i in range(1, min(n, k) + 1)) ans
from math import ceil, log2

n, k = map(int, input().split())
ans = sum(1 / 2 ** ceil(log2(k / i)) for i in range(1, min(n, k) + 1))
print((ans + max(0, n - k)) / n)