import sys
def input(): return sys.stdin.readline().strip()
def mapint(): return map(int, input().split())
sys.setrecursionlimit(10**9)

N, K = mapint()
ans = 0
for i in range(1, N+1):
    cnt = 0
    while i*(2**cnt)<K:
        cnt += 1
    ans += 1/(2**cnt)
print(ans/N) import sys sys def input(): return sys.stdin.readline().strip() input def mapint(): return map(int, input().split()) mapint sys.setrecursionlimit(10**9) sys.setrecursionlimit sys setrecursionlimit 10**9 10 9 N, K = mapint() N mapint() mapint K ans = 0 ans 0 for i in range(1, N+1):
    cnt = 0
    while i*(2**cnt)<K:
        cnt += 1
    ans += 1/(2**cnt) i range(1, N+1) range 1 N+1 N 1 cnt = 0 cnt 0 while i*(2**cnt)<K:
        cnt += 1
     i*(2**cnt)<K i*(2**cnt) i 2**cnt 2 cnt K cnt += 1 cnt 1 ans += 1/(2**cnt) ans 1/(2**cnt) 1 2**cnt 2 cnt print(ans/N) print ans/N ans N ans = 0 0 ans K = mapint() mapint() K def input(): return sys.stdin.readline().strip() def input(): return sys.stdin.readline().strip() input cnt = 0 0 cnt cnt += 1 1 cnt ans += 1/(2**cnt) 1/(2**cnt) ans N, K = mapint() mapint() N def mapint(): return map(int, input().split()) def mapint(): return map(int, input().split()) mapint
import sys
def input(): return sys.stdin.readline().strip()
def mapint(): return map(int, input().split())
sys.setrecursionlimit(10**9)

N, K = mapint()
ans = 0
for i in range(1, N+1):
    cnt = 0
    while i*(2**cnt)<K:
        cnt += 1
    ans += 1/(2**cnt)
print(ans/N)