program main
implicit none
integer :: n, k
integer :: i, j, l
real    :: p

read(*,*) n, k

p = 0.
do i = 1, n
   j = i
   l = 0
   do while (j<k)
      j = j*2
      l = l + 1
   end do
   p = p + (1./n)* (0.5)**l
end do
write(*,'(f19.17)') p
end program main
