import bisect,collections,copy,itertools,math,string
import sys
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())
def main():
    n,k = LI()
    num = 0
    frac = 0
    while n * 2**num < k:
        num+=1
    frac += 1/2**num
    # print(frac)

    for i in range(n-1,0,-1):
        while i * 2**num < k:
            num += 1
        frac += 1/2**num
    
    ans = frac * (1/n)
    print(ans)
main() import bisect,collections,copy,itertools,math,string bisect collections copy itertools math string import sys sys def I(): return int(sys.stdin.readline().rstrip()) I def LI(): return list(map(int,sys.stdin.readline().rstrip().split())) LI def S(): return sys.stdin.readline().rstrip() S def LS(): return list(sys.stdin.readline().rstrip().split()) LS def main():
    n,k = LI()
    num = 0
    frac = 0
    while n * 2**num < k:
        num+=1
    frac += 1/2**num
    # print(frac)

    for i in range(n-1,0,-1):
        while i * 2**num < k:
            num += 1
        frac += 1/2**num
    
    ans = frac * (1/n)
    print(ans) main n,k = LI() n LI() LI k num = 0 num 0 frac = 0 frac 0 while n * 2**num < k:
        num+=1
     n * 2**num < k n * 2**num n 2**num 2 num k num+=1 num 1 frac += 1/2**num frac 1/2**num 1 2**num 2 num for i in range(n-1,0,-1):
        while i * 2**num < k:
            num += 1
        frac += 1/2**num
    
     i range(n-1,0,-1) range n-1 n 1 0 -1 while i * 2**num < k:
            num += 1
         i * 2**num < k i * 2**num i 2**num 2 num k num += 1 num 1 frac += 1/2**num frac 1/2**num 1 2**num 2 num ans = frac * (1/n) ans frac * (1/n) frac 1/n 1 n print(ans) print ans main() main def main():
    n,k = LI()
    num = 0
    frac = 0
    while n * 2**num < k:
        num+=1
    frac += 1/2**num
    # print(frac)

    for i in range(n-1,0,-1):
        while i * 2**num < k:
            num += 1
        frac += 1/2**num
    
    ans = frac * (1/n)
    print(ans) def main():
    n,k = LI()
    num = 0
    frac = 0
    while n * 2**num < k:
        num+=1
    frac += 1/2**num
    # print(frac)

    for i in range(n-1,0,-1):
        while i * 2**num < k:
            num += 1
        frac += 1/2**num
    
    ans = frac * (1/n)
    print(ans) main def LI(): return list(map(int,sys.stdin.readline().rstrip().split())) def LI(): return list(map(int,sys.stdin.readline().rstrip().split())) LI def LS(): return list(sys.stdin.readline().rstrip().split()) def LS(): return list(sys.stdin.readline().rstrip().split()) LS def I(): return int(sys.stdin.readline().rstrip()) def I(): return int(sys.stdin.readline().rstrip()) I def S(): return sys.stdin.readline().rstrip() def S(): return sys.stdin.readline().rstrip() S
import bisect,collections,copy,itertools,math,string
import sys
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())
def main():
    n,k = LI()
    num = 0
    frac = 0
    while n * 2**num < k:
        num+=1
    frac += 1/2**num
    # print(frac)

    for i in range(n-1,0,-1):
        while i * 2**num < k:
            num += 1
        frac += 1/2**num
    
    ans = frac * (1/n)
    print(ans)
main()