program main
implicit none
integer(8) :: i, j, l, m
integer(8) :: n, k

read(*,*) n, k
m = 0
do i = 1, n
   j = 0
   do while( i*2**j .lt.k )
      j = j + 1
   end do
   if( i == 1 ) then
      l = j
   end if
   m = m + 2**(l-j)
end do
write(*,*) dble(m)/(n*2**l)


end program main
