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