from fractions import Fraction
import math

N, K = map(int, input().split())

p = Fraction(0, 1)
if K == 1:
    # 確定勝利
    print("1.0")
else:
    for i in range(1, N+1):
        # 出目i
        if i >= K:
            p += Fraction(1, N)
        else:
            n_win = math.ceil(math.log2(K / i))
            p += Fraction(1, 2**n_win * N)
    print(float(p)) from fractions import Fraction import math math N, K = map(int, input().split()) N map(int, input().split()) map int input().split() ().split () input split K p = Fraction(0, 1) p Fraction(0, 1) Fraction 0 1 if K == 1:
    # 確定勝利
    print("1.0")
else:
    for i in range(1, N+1):
        # 出目i
        if i >= K:
            p += Fraction(1, N)
        else:
            n_win = math.ceil(math.log2(K / i))
            p += Fraction(1, 2**n_win * N)
    print(float(p)) K == 1 K 1 print("1.0") print "1.0" for i in range(1, N+1):
        # 出目i
        if i >= K:
            p += Fraction(1, N)
        else:
            n_win = math.ceil(math.log2(K / i))
            p += Fraction(1, 2**n_win * N)
     i range(1, N+1) range 1 N+1 N 1 if i >= K:
            p += Fraction(1, N)
        else:
            n_win = math.ceil(math.log2(K / i))
            p += Fraction(1, 2**n_win * N)
     i >= K i K p += Fraction(1, N) p Fraction(1, N) Fraction 1 N n_win = math.ceil(math.log2(K / i)) n_win math.ceil(math.log2(K / i)) math.ceil math ceil math.log2(K / i) math.log2 math log2 K / i K i p += Fraction(1, 2**n_win * N) p Fraction(1, 2**n_win * N) Fraction 1 2**n_win * N 2**n_win 2 n_win N print(float(p)) print float(p) float p K = map(int, input().split()) map(int, input().split()) K p += Fraction(1, 2**n_win * N) Fraction(1, 2**n_win * N) p N, K = map(int, input().split()) map(int, input().split()) N p = Fraction(0, 1) Fraction(0, 1) p n_win = math.ceil(math.log2(K / i)) math.ceil(math.log2(K / i)) n_win p += Fraction(1, N) Fraction(1, N) p
from fractions import Fraction
import math

N, K = map(int, input().split())

p = Fraction(0, 1)
if K == 1:
    # 確定勝利
    print("1.0")
else:
    for i in range(1, N+1):
        # 出目i
        if i >= K:
            p += Fraction(1, N)
        else:
            n_win = math.ceil(math.log2(K / i))
            p += Fraction(1, 2**n_win * N)
    print(float(p))
