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