from fractions import Fraction
from decimal import Decimal

def twice_num(i, limit):
    count = 0
    while i < limit:
        i *= 2
        count += 1
    return count

def main():
    n, k = map(int, input().split())

    ans = 0

    for i in range(1, n+1):
        p = Fraction(1, n)

        num = twice_num(i, k)
        if num > 0:
            p *= Fraction(1, 2**num)
        ans += p

    ans = Decimal(ans.numerator) / Decimal(ans.denominator)
    print("{:.12f}".format(ans))


main() from fractions import Fraction from decimal import Decimal def twice_num(i, limit):
    count = 0
    while i < limit:
        i *= 2
        count += 1
    return count twice_num count = 0 count 0 while i < limit:
        i *= 2
        count += 1
     i < limit i limit i *= 2 i 2 count += 1 count 1 return count count i i limit limit def main():
    n, k = map(int, input().split())

    ans = 0

    for i in range(1, n+1):
        p = Fraction(1, n)

        num = twice_num(i, k)
        if num > 0:
            p *= Fraction(1, 2**num)
        ans += p

    ans = Decimal(ans.numerator) / Decimal(ans.denominator)
    print("{:.12f}".format(ans)) main n, k = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split k ans = 0 ans 0 for i in range(1, n+1):
        p = Fraction(1, n)

        num = twice_num(i, k)
        if num > 0:
            p *= Fraction(1, 2**num)
        ans += p

     i range(1, n+1) range 1 n+1 n 1 p = Fraction(1, n) p Fraction(1, n) Fraction 1 n num = twice_num(i, k) num twice_num(i, k) twice_num i k if num > 0:
            p *= Fraction(1, 2**num)
         num > 0 num 0 p *= Fraction(1, 2**num) p Fraction(1, 2**num) Fraction 1 2**num 2 num ans += p ans p ans = Decimal(ans.numerator) / Decimal(ans.denominator) ans Decimal(ans.numerator) / Decimal(ans.denominator) Decimal(ans.numerator) Decimal ans.numerator ans numerator Decimal(ans.denominator) Decimal ans.denominator ans denominator print("{:.12f}".format(ans)) print "{:.12f}".format(ans) "{:.12f}".format "{:.12f}" format ans main() main def twice_num(i, limit):
    count = 0
    while i < limit:
        i *= 2
        count += 1
    return count def twice_num(i, limit):
    count = 0
    while i < limit:
        i *= 2
        count += 1
    return count twice_num def main():
    n, k = map(int, input().split())

    ans = 0

    for i in range(1, n+1):
        p = Fraction(1, n)

        num = twice_num(i, k)
        if num > 0:
            p *= Fraction(1, 2**num)
        ans += p

    ans = Decimal(ans.numerator) / Decimal(ans.denominator)
    print("{:.12f}".format(ans)) def main():
    n, k = map(int, input().split())

    ans = 0

    for i in range(1, n+1):
        p = Fraction(1, n)

        num = twice_num(i, k)
        if num > 0:
            p *= Fraction(1, 2**num)
        ans += p

    ans = Decimal(ans.numerator) / Decimal(ans.denominator)
    print("{:.12f}".format(ans)) main
from fractions import Fraction
from decimal import Decimal

def twice_num(i, limit):
    count = 0
    while i < limit:
        i *= 2
        count += 1
    return count

def main():
    n, k = map(int, input().split())

    ans = 0

    for i in range(1, n+1):
        p = Fraction(1, n)

        num = twice_num(i, k)
        if num > 0:
            p *= Fraction(1, 2**num)
        ans += p

    ans = Decimal(ans.numerator) / Decimal(ans.denominator)
    print("{:.12f}".format(ans))


main()
