program name
    implicit none
    integer(4):: n,k
    integer(4):: i,wnum
    real(8):: ans
    read*, n,k
    ans=0
    do i=1, n
        wnum=0
        do while(i*2**wnum < k)
            wnum = wnum + 1
        end do
        ans=ans+ 1d0/dble(n) * (0.5d0)**wnum
    end do

    print*, ans
end program name