program kadai
	implicit none

	integer  ::  in(2)
    integer  ::  N,K,i,num,j
    real(8)  ::  n_n,ans
    read(*,*) in
    ans=0
    N=in(1)
    K=in(2)
    
    n_n=real(N,8)
    do i=1,N
    num=i
    	do while(num<K)
        	num=num*2
            j=j+1
        end do
    ans=ans+(1.0_8/2.0_8)**j
    j=0
    end do
    
    ans=ans/n_n
    
    write(*,*) ans
    
    
end program kadai