from fractions import Fraction



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



proba = 0

for i in range(1,N+1):

	deme = i

	con = 0

	while deme < K:

		deme *= 2

		con += 1

	proba += (1/N)*((1/2)**con)



print((float(proba)))

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



proba = 0

for i in range(1,N+1):

	deme = i

	con = 0

	while deme < K:

		deme *= 2

		con += 1

	proba += (1/N)*((1/2)**con)



print((float(proba)))

    
from fractions import Fraction

N, K = list(map(int, input().split()))
proba = 0
for i in range(1, N + 1):
    deme = i
    con = 0
    while deme < K:
        deme *= 2
        con += 1
    proba += (1 / N) * ((1 / 2) ** con)
print((float(proba)))

N, K = list(map(int, input().split()))
proba = 0
for i in range(1, N + 1):
    deme = i
    con = 0
    while deme < K:
        deme *= 2
        con += 1
    proba += (1 / N) * ((1 / 2) ** con)
print((float(proba)))

-from fractions import Fraction -