import math
s = input().split()
n=int(s[0])
k=int(s[1])
ans=0
for i in range(1,n+1):
    a=math.log2(k/i)
    if a<0:
        a=0
    a=math.ceil(a)
    ans+=(1/n)*(1/2)**a

print(ans) import math math s = input().split() s input().split() ().split () input split n=int(s[0]) n int(s[0]) int s[0] s 0 k=int(s[1]) k int(s[1]) int s[1] s 1 ans=0 ans 0 for i in range(1,n+1):
    a=math.log2(k/i)
    if a<0:
        a=0
    a=math.ceil(a)
    ans+=(1/n)*(1/2)**a i range(1,n+1) range 1 n+1 n 1 a=math.log2(k/i) a math.log2(k/i) math.log2 math log2 k/i k i if a<0:
        a=0
     a<0 a 0 a=0 a 0 a=math.ceil(a) a math.ceil(a) math.ceil math ceil a ans+=(1/n)*(1/2)**a ans (1/n)*(1/2)**a 1/n 1 n (1/2)**a 1/2 1 2 a print(ans) print ans a=math.log2(k/i) math.log2(k/i) a s = input().split() input().split() s n=int(s[0]) int(s[0]) n k=int(s[1]) int(s[1]) k ans=0 0 ans a=math.ceil(a) math.ceil(a) a ans+=(1/n)*(1/2)**a (1/n)*(1/2)**a ans a=0 0 a
import math
s = input().split()
n=int(s[0])
k=int(s[1])
ans=0
for i in range(1,n+1):
    a=math.log2(k/i)
    if a<0:
        a=0
    a=math.ceil(a)
    ans+=(1/n)*(1/2)**a

print(ans)