import math
from fractions import Fraction

#入力:N,M(int:整数)
def input2():
	return map(int,input().split())

n,k=input2()
ans=0
for i in range(1,n+1):
	point=i
	if point>=k:
		ans+=Fraction(n-point+1,n)
		break
	else:
		tmp=math.ceil(math.log2((k/point)))
		ans+=Fraction(1,n)*Fraction(1,2**tmp)
print(float(ans)) import math math from fractions import Fraction def input2():
	return map(int,input().split()) input2 return map(int,input().split()) map(int,input().split()) map int input().split() ().split () input split n,k=input2() n input2() input2 k ans=0 ans 0 for i in range(1,n+1):
	point=i
	if point>=k:
		ans+=Fraction(n-point+1,n)
		break
	else:
		tmp=math.ceil(math.log2((k/point)))
		ans+=Fraction(1,n)*Fraction(1,2**tmp) i range(1,n+1) range 1 n+1 n 1 point=i point i if point>=k:
		ans+=Fraction(n-point+1,n)
		break
	else:
		tmp=math.ceil(math.log2((k/point)))
		ans+=Fraction(1,n)*Fraction(1,2**tmp) point>=k point k ans+=Fraction(n-point+1,n) ans Fraction(n-point+1,n) Fraction n-point+1 n-point n point 1 n break tmp=math.ceil(math.log2((k/point))) tmp math.ceil(math.log2((k/point))) math.ceil math ceil math.log2((k/point)) math.log2 math log2 k/point k point ans+=Fraction(1,n)*Fraction(1,2**tmp) ans Fraction(1,n)*Fraction(1,2**tmp) Fraction(1,n) Fraction 1 n Fraction(1,2**tmp) Fraction 1 2**tmp 2 tmp print(float(ans)) print float(ans) float ans ans+=Fraction(1,n)*Fraction(1,2**tmp) Fraction(1,n)*Fraction(1,2**tmp) ans n,k=input2() input2() n ans=0 0 ans def input2():
	return map(int,input().split()) def input2():
	return map(int,input().split()) input2 point=i i point tmp=math.ceil(math.log2((k/point))) math.ceil(math.log2((k/point))) tmp k=input2() input2() k ans+=Fraction(n-point+1,n) Fraction(n-point+1,n) ans
import math
from fractions import Fraction

#入力:N,M(int:整数)
def input2():
	return map(int,input().split())

n,k=input2()
ans=0
for i in range(1,n+1):
	point=i
	if point>=k:
		ans+=Fraction(n-point+1,n)
		break
	else:
		tmp=math.ceil(math.log2((k/point)))
		ans+=Fraction(1,n)*Fraction(1,2**tmp)
print(float(ans))