import sys
from fractions import Fraction

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())

N, K = LI()


kakuritu = []
for i in range(1,N+1):
    count = 0
    while i < K:
        i *= 2
        count += 1
    kakuritu.append(N*(2**count))
result = 0
for kaku in kakuritu:
    result += Fraction(1, kaku)


print(result.numerator / result.denominator) import sys sys from fractions import Fraction 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 N, K = LI() N LI() LI K kakuritu = [] kakuritu [] for i in range(1,N+1):
    count = 0
    while i < K:
        i *= 2
        count += 1
    kakuritu.append(N*(2**count)) i range(1,N+1) range 1 N+1 N 1 count = 0 count 0 while i < K:
        i *= 2
        count += 1
     i < K i K i *= 2 i 2 count += 1 count 1 kakuritu.append(N*(2**count)) kakuritu.append kakuritu append N*(2**count) N 2**count 2 count result = 0 result 0 for kaku in kakuritu:
    result += Fraction(1, kaku) kaku kakuritu result += Fraction(1, kaku) result Fraction(1, kaku) Fraction 1 kaku print(result.numerator / result.denominator) print result.numerator / result.denominator result.numerator result numerator result.denominator result denominator count += 1 1 count def I(): return int(sys.stdin.readline().rstrip()) def I(): return int(sys.stdin.readline().rstrip()) I result += Fraction(1, kaku) Fraction(1, kaku) result N, K = LI() LI() N def LS(): return list(sys.stdin.readline().rstrip().split()) def LS(): return list(sys.stdin.readline().rstrip().split()) LS result = 0 0 result kakuritu = [] [] kakuritu i *= 2 2 i K = LI() LI() K def S(): return sys.stdin.readline().rstrip() def S(): return sys.stdin.readline().rstrip() S def LI(): return list(map(int,sys.stdin.readline().rstrip().split())) def LI(): return list(map(int,sys.stdin.readline().rstrip().split())) LI count = 0 0 count
import sys
from fractions import Fraction

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())

N, K = LI()


kakuritu = []
for i in range(1,N+1):
    count = 0
    while i < K:
        i *= 2
        count += 1
    kakuritu.append(N*(2**count))
result = 0
for kaku in kakuritu:
    result += Fraction(1, kaku)


print(result.numerator / result.denominator)