import java.util.*

fun main(args: Array<String>) {
    val sc = Scanner(System.`in`)
    val n = sc.nextInt()
    val k = sc.nextInt()

    println(abc126c(n, k))
}

fun abc126c(n: Int, k: Int): Double {
    var ans = 0.0
    for (i in 1..n) {
        ans += calc(i, k) / n
    }

    return ans
}

private fun calc(i: Int, k: Int): Double {
    var score = i
    if (score >= k) return 1.0

    var count = 0.0
    while (score < k) {
        score *= 2
        count++
    }

    return Math.pow(0.5, count)
}