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