'use strict'
function Main(input) {
    input = input.split("\n")[0].split(' ').map(str => parseInt(str))
    let N = input[0]
    let K = input[1]
    let hosei = 0

    if(N >= K) {
      hosei = N - K + 1
      N = K - 1
    }

    let J = [...Array(N).keys()].map(i => ++i).map(j => {
      return Math.ceil(Math.log2(K) - Math.log2(j))
    })

    let sum = J.reduce((sum, next) => {
       return sum + 2 >> next
     } , 0)
     
    sum += hosei

   const result = sum / input[0]

    console.log(result)
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"))