from collections import Counter,defaultdict,deque
from heapq import heappop,heappush,heapify
import sys,bisect,math,itertools,fractions
sys.setrecursionlimit(10**8)
mod = 10**9+7
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))


n,k = inpl()
res = 0
for i in range(1,n+1):
    cnt = 0
    now = i
    if i > k:
        res += 1/n
        continue
    while now < k:
        now *= 2
        cnt += 1
    res += 1/n*(1/2**cnt)
print(res) from collections import Counter,defaultdict,deque from heapq import heappop,heappush,heapify import sys,bisect,math,itertools,fractions sys bisect math itertools fractions sys.setrecursionlimit(10**8) sys.setrecursionlimit sys setrecursionlimit 10**8 10 8 mod = 10**9+7 mod 10**9+7 10**9 10 9 7 INF = float('inf') INF float('inf') float 'inf' def inp(): return int(sys.stdin.readline()) inp def inpl(): return list(map(int, sys.stdin.readline().split())) inpl n,k = inpl() n inpl() inpl k res = 0 res 0 for i in range(1,n+1):
    cnt = 0
    now = i
    if i > k:
        res += 1/n
        continue
    while now < k:
        now *= 2
        cnt += 1
    res += 1/n*(1/2**cnt) i range(1,n+1) range 1 n+1 n 1 cnt = 0 cnt 0 now = i now i if i > k:
        res += 1/n
        continue
     i > k i k res += 1/n res 1/n 1 n continue while now < k:
        now *= 2
        cnt += 1
     now < k now k now *= 2 now 2 cnt += 1 cnt 1 res += 1/n*(1/2**cnt) res 1/n*(1/2**cnt) 1/n 1 n 1/2**cnt 1 2**cnt 2 cnt print(res) print res cnt += 1 1 cnt now *= 2 2 now def inpl(): return list(map(int, sys.stdin.readline().split())) def inpl(): return list(map(int, sys.stdin.readline().split())) inpl mod = 10**9+7 10**9+7 mod n,k = inpl() inpl() n res += 1/n*(1/2**cnt) 1/n*(1/2**cnt) res k = inpl() inpl() k res = 0 0 res now = i i now INF = float('inf') float('inf') INF def inp(): return int(sys.stdin.readline()) def inp(): return int(sys.stdin.readline()) inp res += 1/n 1/n res cnt = 0 0 cnt
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush,heapify
import sys,bisect,math,itertools,fractions
sys.setrecursionlimit(10**8)
mod = 10**9+7
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))


n,k = inpl()
res = 0
for i in range(1,n+1):
    cnt = 0
    now = i
    if i > k:
        res += 1/n
        continue
    while now < k:
        now *= 2
        cnt += 1
    res += 1/n*(1/2**cnt)
print(res)