from decimal import Decimal as d 
n,k=map(int,input().split())
ans=d(0)
for i in range(1,n+1):
    x=d(1)
    if i>=k:
        ans+=d(x)
    else:
        while i<k:
            x=d(x)/d(2)
            i*=2
        ans+=x
print(d(ans)/d(n))
        

         from decimal import Decimal as d n,k=map(int,input().split()) n map(int,input().split()) map int input().split() ().split () input split k ans=d(0) ans d(0) d 0 for i in range(1,n+1):
    x=d(1)
    if i>=k:
        ans+=d(x)
    else:
        while i<k:
            x=d(x)/d(2)
            i*=2
        ans+=x i range(1,n+1) range 1 n+1 n 1 x=d(1) x d(1) d 1 if i>=k:
        ans+=d(x)
    else:
        while i<k:
            x=d(x)/d(2)
            i*=2
        ans+=x i>=k i k ans+=d(x) ans d(x) d x while i<k:
            x=d(x)/d(2)
            i*=2
         i<k i k x=d(x)/d(2) x d(x)/d(2) d(x) d x d(2) d 2 i*=2 i 2 ans+=x ans x print(d(ans)/d(n)) print d(ans)/d(n) d(ans) d ans d(n) d n k=map(int,input().split()) map(int,input().split()) k ans+=d(x) d(x) ans i*=2 2 i x=d(1) d(1) x ans=d(0) d(0) ans x=d(x)/d(2) d(x)/d(2) x ans+=x x ans n,k=map(int,input().split()) map(int,input().split()) n
from decimal import Decimal as d 
n,k=map(int,input().split())
ans=d(0)
for i in range(1,n+1):
    x=d(1)
    if i>=k:
        ans+=d(x)
    else:
        while i<k:
            x=d(x)/d(2)
            i*=2
        ans+=x
print(d(ans)/d(n))
        

        
