program ccc
implicit none

integer :: n, k, i, j
integer,allocatable,dimension(:) :: m
real(8) :: res

read*, n, k
allocate(m(n))
m=0

do i=1,n
 j=i
 do while(j<k)
 j=j*2
 m(i)=m(i)+1
 end do
end do

res=0

do i=1,n
res=res+0.5D0**m(i)
end do

res=res*(1/dble(n))

write(*,*) res

end program