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

read(*,*) n, k

kk = k
ii = 0
do while ( kk .ge. 1)
   kk = kk /2.
   ii = ii + 1
end do

m = 0
do i = 1, n
   j = i
   l = 0
   do while (j<k)
      j = j*2
      l = l + 1
   end do
   m = m + 1
end do
p = m/(n*2**ii)
write(*,'(f16.14)') p
end program main
