//import java.math.BigDecimal
import java.util.*

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

    val counts = (1..n).map { reqFace(it, k) }
    val maxCount = counts.max()!!
    val sum = counts.map { Math.pow(2.0, (maxCount - it).toDouble()) }.sum()
    print(sum / (n * (Math.pow(2.0, maxCount.toDouble()))))
//    val sum = counts.map { BigDecimal(2).pow(maxCount - it) }.sumBy { it.toInt() }
//    val ans = BigDecimal(sum).divide(BigDecimal(n).multiply(BigDecimal(2).pow(maxCount)))
//    print(ans.toPlainString())
}

fun reqFace(base: Int, req: Int): Int {
    if (base >= req) return 0

    var count = 1
    var score = base
    while (score * 2 < req) {
        score *= 2
        count++
    }
    return count
}