def readinput():
    n,k=map(int,input().split())
    return n,k

def main(n,k):
    ans=0
    for i in range(1,n+1):
        p=1/n
        point=i
        while(point<k):
            point*=2
            p/=2
        #print(p)
        ans+=p
    return ans

if __name__=='__main__':
    n,k=readinput()
    ans=main(n,k)
    print(ans) def readinput():
    n,k=map(int,input().split())
    return n,k readinput n,k=map(int,input().split()) n map(int,input().split()) map int input().split() ().split () input split k return n,k return n,k n k def main(n,k):
    ans=0
    for i in range(1,n+1):
        p=1/n
        point=i
        while(point<k):
            point*=2
            p/=2
        #print(p)
        ans+=p
    return ans main ans=0 ans 0 for i in range(1,n+1):
        p=1/n
        point=i
        while(point<k):
            point*=2
            p/=2
        #print(p)
        ans+=p
     i range(1,n+1) range 1 n+1 n 1 p=1/n p 1/n 1 n point=i point i while(point<k):
            point*=2
            p/=2
        #print(p)
         point<k point k point*=2 point 2 p/=2 p 2 ans+=p ans p return ans ans n n k k if __name__=='__main__':
    n,k=readinput()
    ans=main(n,k)
    print(ans) __name__=='__main__' __name__ '__main__' n,k=readinput() n readinput() readinput k ans=main(n,k) ans main(n,k) main n k print(ans) print ans k=readinput() readinput() k def main(n,k):
    ans=0
    for i in range(1,n+1):
        p=1/n
        point=i
        while(point<k):
            point*=2
            p/=2
        #print(p)
        ans+=p
    return ans def main(n,k):
    ans=0
    for i in range(1,n+1):
        p=1/n
        point=i
        while(point<k):
            point*=2
            p/=2
        #print(p)
        ans+=p
    return ans main ans=main(n,k) main(n,k) ans n,k=readinput() readinput() n def readinput():
    n,k=map(int,input().split())
    return n,k def readinput():
    n,k=map(int,input().split())
    return n,k readinput
def readinput():
    n,k=map(int,input().split())
    return n,k

def main(n,k):
    ans=0
    for i in range(1,n+1):
        p=1/n
        point=i
        while(point<k):
            point*=2
            p/=2
        #print(p)
        ans+=p
    return ans

if __name__=='__main__':
    n,k=readinput()
    ans=main(n,k)
    print(ans)
