import sys
from sys import exit
from collections import deque
from bisect import bisect_left, bisect_right, insort_left, insort_right #func(リスト,値)
from heapq import heapify, heappop, heappush
from math import *

sys.setrecursionlimit(10**6)
INF = 10**20
eps = 1.0e-20
MOD = 10**9+7

def mint():
    return map(int,input().split())
def lint():
    return list(map(int,input().split()))
def judge(x, l=['Yes', 'No']):
    print(l[0] if x else l[1])
def lprint(l, sep='\n'):
    for x in l:
        print(x, end=sep)

N,K = mint()
ans = 0

def div2(x):
    k = 0
    while x<K:
        k += 1
        x *= 2
    return k

for i in range(1,N+1):
    ans += (1/N)*(1/2)**div2(i)
print(ans) import sys sys from sys import exit from collections import deque from bisect import bisect_left, bisect_right, insort_left, insort_right from heapq import heapify, heappop, heappush from math import * sys.setrecursionlimit(10**6) sys.setrecursionlimit sys setrecursionlimit 10**6 10 6 INF = 10**20 INF 10**20 10 20 eps = 1.0e-20 eps 1.0e-20 MOD = 10**9+7 MOD 10**9+7 10**9 10 9 7 def mint():
    return map(int,input().split()) mint return map(int,input().split()) map(int,input().split()) map int input().split() ().split () input split def lint():
    return list(map(int,input().split())) lint return list(map(int,input().split())) list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split def judge(x, l=['Yes', 'No']):
    print(l[0] if x else l[1]) judge print(l[0] if x else l[1]) print l[0] if x else l[1] x l[0] l 0 l[1] l 1 x x l=['Yes', 'No'] l ['Yes', 'No'] 'Yes' 'No' def lprint(l, sep='\n'):
    for x in l:
        print(x, end=sep) lprint for x in l:
        print(x, end=sep) x l print(x, end=sep) print x end=sep end sep l l sep='\n' sep '\n' N,K = mint() N mint() mint K ans = 0 ans 0 def div2(x):
    k = 0
    while x<K:
        k += 1
        x *= 2
    return k div2 k = 0 k 0 while x<K:
        k += 1
        x *= 2
     x<K x K k += 1 k 1 x *= 2 x 2 return k k x x for i in range(1,N+1):
    ans += (1/N)*(1/2)**div2(i) i range(1,N+1) range 1 N+1 N 1 ans += (1/N)*(1/2)**div2(i) ans (1/N)*(1/2)**div2(i) 1/N 1 N (1/2)**div2(i) 1/2 1 2 div2(i) div2 i print(ans) print ans INF = 10**20 10**20 INF def lprint(l, sep='\n'):
    for x in l:
        print(x, end=sep) def lprint(l, sep='\n'):
    for x in l:
        print(x, end=sep) lprint K = mint() mint() K MOD = 10**9+7 10**9+7 MOD def judge(x, l=['Yes', 'No']):
    print(l[0] if x else l[1]) def judge(x, l=['Yes', 'No']):
    print(l[0] if x else l[1]) judge def div2(x):
    k = 0
    while x<K:
        k += 1
        x *= 2
    return k def div2(x):
    k = 0
    while x<K:
        k += 1
        x *= 2
    return k div2 def lint():
    return list(map(int,input().split())) def lint():
    return list(map(int,input().split())) lint def mint():
    return map(int,input().split()) def mint():
    return map(int,input().split()) mint ans += (1/N)*(1/2)**div2(i) (1/N)*(1/2)**div2(i) ans N,K = mint() mint() N eps = 1.0e-20 1.0e-20 eps ans = 0 0 ans
import sys
from sys import exit
from collections import deque
from bisect import bisect_left, bisect_right, insort_left, insort_right #func(リスト,値)
from heapq import heapify, heappop, heappush
from math import *

sys.setrecursionlimit(10**6)
INF = 10**20
eps = 1.0e-20
MOD = 10**9+7

def mint():
    return map(int,input().split())
def lint():
    return list(map(int,input().split()))
def judge(x, l=['Yes', 'No']):
    print(l[0] if x else l[1])
def lprint(l, sep='\n'):
    for x in l:
        print(x, end=sep)

N,K = mint()
ans = 0

def div2(x):
    k = 0
    while x<K:
        k += 1
        x *= 2
    return k

for i in range(1,N+1):
    ans += (1/N)*(1/2)**div2(i)
print(ans)