import math
#N = int(input())
#S = str(input())
#A, B = map(int, input().split())
#C = list(map(int, input().split()))

N, K = map(int, input().split())

ans = 0
for i in range(1, N + 1):
  if i < K:
    tt = math.log2(K/i)
    if tt % 1 == 0:
      time = int(tt)
    else:
      time = int(tt) + 1
    ans += (1 / N) * ((1 / 2) ** time)
  else:
    ans += (1/ N)
#  print(time, ans)
  
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):
  if i < K:
    tt = math.log2(K/i)
    if tt % 1 == 0:
      time = int(tt)
    else:
      time = int(tt) + 1
    ans += (1 / N) * ((1 / 2) ** time)
  else:
    ans += (1/ N)
#  print(time, ans)
   i range(1, N + 1) range 1 N + 1 N 1 if i < K:
    tt = math.log2(K/i)
    if tt % 1 == 0:
      time = int(tt)
    else:
      time = int(tt) + 1
    ans += (1 / N) * ((1 / 2) ** time)
  else:
    ans += (1/ N)
#  print(time, ans)
   i < K i K tt = math.log2(K/i) tt math.log2(K/i) math.log2 math log2 K/i K i if tt % 1 == 0:
      time = int(tt)
    else:
      time = int(tt) + 1
     tt % 1 == 0 tt % 1 tt 1 0 time = int(tt) time int(tt) int tt time = int(tt) + 1 time int(tt) + 1 int(tt) int tt 1 ans += (1 / N) * ((1 / 2) ** time) ans (1 / N) * ((1 / 2) ** time) 1 / N 1 N (1 / 2) ** time 1 / 2 1 2 time ans += (1/ N) ans 1/ N 1 N print(ans) print ans ans += (1/ N) 1/ N ans K = map(int, input().split()) map(int, input().split()) K tt = math.log2(K/i) math.log2(K/i) tt N, K = map(int, input().split()) map(int, input().split()) N ans = 0 0 ans time = int(tt) int(tt) time time = int(tt) + 1 int(tt) + 1 time ans += (1 / N) * ((1 / 2) ** time) (1 / N) * ((1 / 2) ** time) ans
import math
#N = int(input())
#S = str(input())
#A, B = map(int, input().split())
#C = list(map(int, input().split()))

N, K = map(int, input().split())

ans = 0
for i in range(1, N + 1):
  if i < K:
    tt = math.log2(K/i)
    if tt % 1 == 0:
      time = int(tt)
    else:
      time = int(tt) + 1
    ans += (1 / N) * ((1 / 2) ** time)
  else:
    ans += (1/ N)
#  print(time, ans)
  
print(ans)  