import math
N, K = map(int, input().split())
p = 0
for i in range(1,N+1):
  if i < K:
    times = math.ceil(math.log2(K/i))
    p = p + (1/N)*(1/2)**times
  else:
    p = p + (1/N)
print(p)
   import math math N, K = map(int, input().split()) N map(int, input().split()) map int input().split() ().split () input split K p = 0 p 0 for i in range(1,N+1):
  if i < K:
    times = math.ceil(math.log2(K/i))
    p = p + (1/N)*(1/2)**times
  else:
    p = p + (1/N) i range(1,N+1) range 1 N+1 N 1 if i < K:
    times = math.ceil(math.log2(K/i))
    p = p + (1/N)*(1/2)**times
  else:
    p = p + (1/N) i < K i K times = math.ceil(math.log2(K/i)) times math.ceil(math.log2(K/i)) math.ceil math ceil math.log2(K/i) math.log2 math log2 K/i K i p = p + (1/N)*(1/2)**times p p + (1/N)*(1/2)**times p (1/N)*(1/2)**times 1/N 1 N (1/2)**times 1/2 1 2 times p = p + (1/N) p p + (1/N) p 1/N 1 N print(p) print p times = math.ceil(math.log2(K/i)) math.ceil(math.log2(K/i)) times K = map(int, input().split()) map(int, input().split()) K p = p + (1/N)*(1/2)**times p + (1/N)*(1/2)**times p N, K = map(int, input().split()) map(int, input().split()) N p = 0 0 p p = p + (1/N) p + (1/N) p
import math
N, K = map(int, input().split())
p = 0
for i in range(1,N+1):
  if i < K:
    times = math.ceil(math.log2(K/i))
    p = p + (1/N)*(1/2)**times
  else:
    p = p + (1/N)
print(p)
  
