import math

N, K = map(int, input().split())

ans = 0
for n in range(1, N+1):
    if n >= K:
        ans += 1/N
        continue
    x = math.ceil(math.log2(K/n))
    ans += (0.5**x)/N

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 = 0 ans 0 for n in range(1, N+1):
    if n >= K:
        ans += 1/N
        continue
    x = math.ceil(math.log2(K/n))
    ans += (0.5**x)/N n range(1, N+1) range 1 N+1 N 1 if n >= K:
        ans += 1/N
        continue
     n >= K n K ans += 1/N ans 1/N 1 N continue x = math.ceil(math.log2(K/n)) x math.ceil(math.log2(K/n)) math.ceil math ceil math.log2(K/n) math.log2 math log2 K/n K n ans += (0.5**x)/N ans (0.5**x)/N 0.5**x 0.5 x N print(ans) print ans N, K = map(int, input().split()) map(int, input().split()) N ans += (0.5**x)/N (0.5**x)/N ans K = map(int, input().split()) map(int, input().split()) K ans = 0 0 ans x = math.ceil(math.log2(K/n)) math.ceil(math.log2(K/n)) x ans += 1/N 1/N ans
import math

N, K = map(int, input().split())

ans = 0
for n in range(1, N+1):
    if n >= K:
        ans += 1/N
        continue
    x = math.ceil(math.log2(K/n))
    ans += (0.5**x)/N

print(ans)
