import math
N, K = map(int, input().split())
p = [0] * N
for i in range(N):
    n = i + 1
    x = 1 / N
    while n < K:
        x *= 0.5
        n *= 2
    p[i] = x
ans = math.fsum(p)
print(ans) import math math N, K = map(int, input().split()) N map(int, input().split()) map int input().split() ().split () input split K p = [0] * N p [0] * N [0] 0 N for i in range(N):
    n = i + 1
    x = 1 / N
    while n < K:
        x *= 0.5
        n *= 2
    p[i] = x i range(N) range N n = i + 1 n i + 1 i 1 x = 1 / N x 1 / N 1 N while n < K:
        x *= 0.5
        n *= 2
     n < K n K x *= 0.5 x 0.5 n *= 2 n 2 p[i] = x p[i] p i x ans = math.fsum(p) ans math.fsum(p) math.fsum math fsum p print(ans) print ans n = i + 1 i + 1 n x *= 0.5 0.5 x p = [0] * N [0] * N p ans = math.fsum(p) math.fsum(p) ans x = 1 / N 1 / N x N, K = map(int, input().split()) map(int, input().split()) N n *= 2 2 n K = map(int, input().split()) map(int, input().split()) K
import math
N, K = map(int, input().split())
p = [0] * N
for i in range(N):
    n = i + 1
    x = 1 / N
    while n < K:
        x *= 0.5
        n *= 2
    p[i] = x
ans = math.fsum(p)
print(ans)