import math


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

ans = max(0, (n-k+1)/n)
for i in range(1, n+1):
    if i >= k:
        break
    x = math.ceil(math.log2(k/i))
    ans += (1/n) * (1/2)**x
print(ans) import math math n, k = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split k ans = max(0, (n-k+1)/n) ans max(0, (n-k+1)/n) max 0 (n-k+1)/n n-k+1 n-k n k 1 n for i in range(1, n+1):
    if i >= k:
        break
    x = math.ceil(math.log2(k/i))
    ans += (1/n) * (1/2)**x i range(1, n+1) range 1 n+1 n 1 if i >= k:
        break
     i >= k i k break x = math.ceil(math.log2(k/i)) x math.ceil(math.log2(k/i)) math.ceil math ceil math.log2(k/i) math.log2 math log2 k/i k i ans += (1/n) * (1/2)**x ans (1/n) * (1/2)**x 1/n 1 n (1/2)**x 1/2 1 2 x print(ans) print ans x = math.ceil(math.log2(k/i)) math.ceil(math.log2(k/i)) x n, k = map(int, input().split()) map(int, input().split()) n ans = max(0, (n-k+1)/n) max(0, (n-k+1)/n) ans k = map(int, input().split()) map(int, input().split()) k ans += (1/n) * (1/2)**x (1/n) * (1/2)**x ans
import math


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

ans = max(0, (n-k+1)/n)
for i in range(1, n+1):
    if i >= k:
        break
    x = math.ceil(math.log2(k/i))
    ans += (1/n) * (1/2)**x
print(ans)
