program cc
  implicit none
  integer :: n, k, i,point,sum
  integer,allocatable :: div(:)
  double precision :: prob, ans
  read *, n, k
  allocate(div(n))
  ans = 0
  div = 0
  point = 1
  prob = 1
  do i = 1, n
    point = i
    prob = 1
    do while (point < k)
      point = point * 2
      div(i) = div(i) + 1
    end do
  end do
  sum = 0
  do i = 1, n 
    sum = sum + 2**(div(1)-div(i))
  end do 
  ans = dble(sum)/(2.0**dble(div(1))*dble(n))
  print '(f15.13)', ans
  stop
end program cc
