import sys
from math import ceil, log2

stdin = sys.stdin
def ns(): return stdin.readline().rstrip()
def ni(): return int(stdin.readline().rstrip())
def nm(): return map(int, stdin.readline().split())
def nl(): return list(map(int, stdin.readline().split()))


n, k = nm()
p = 0
for i in range(1, n + 1):
    if i >= k:
        p += 1 / n
    else:
        num = ceil(log2(k / i))
        p += (1 / n) * (1 / pow(2, num))

print(p) import sys sys from math import ceil, log2 stdin = sys.stdin stdin sys.stdin sys stdin def ns(): return stdin.readline().rstrip() ns def ni(): return int(stdin.readline().rstrip()) ni def nm(): return map(int, stdin.readline().split()) nm def nl(): return list(map(int, stdin.readline().split())) nl n, k = nm() n nm() nm k p = 0 p 0 for i in range(1, n + 1):
    if i >= k:
        p += 1 / n
    else:
        num = ceil(log2(k / i))
        p += (1 / n) * (1 / pow(2, num)) i range(1, n + 1) range 1 n + 1 n 1 if i >= k:
        p += 1 / n
    else:
        num = ceil(log2(k / i))
        p += (1 / n) * (1 / pow(2, num)) i >= k i k p += 1 / n p 1 / n 1 n num = ceil(log2(k / i)) num ceil(log2(k / i)) ceil log2(k / i) log2 k / i k i p += (1 / n) * (1 / pow(2, num)) p (1 / n) * (1 / pow(2, num)) 1 / n 1 n 1 / pow(2, num) 1 pow(2, num) pow 2 num print(p) print p p = 0 0 p def nl(): return list(map(int, stdin.readline().split())) def nl(): return list(map(int, stdin.readline().split())) nl p += (1 / n) * (1 / pow(2, num)) (1 / n) * (1 / pow(2, num)) p def nm(): return map(int, stdin.readline().split()) def nm(): return map(int, stdin.readline().split()) nm p += 1 / n 1 / n p def ni(): return int(stdin.readline().rstrip()) def ni(): return int(stdin.readline().rstrip()) ni k = nm() nm() k def ns(): return stdin.readline().rstrip() def ns(): return stdin.readline().rstrip() ns n, k = nm() nm() n num = ceil(log2(k / i)) ceil(log2(k / i)) num stdin = sys.stdin sys.stdin stdin
import sys
from math import ceil, log2

stdin = sys.stdin
def ns(): return stdin.readline().rstrip()
def ni(): return int(stdin.readline().rstrip())
def nm(): return map(int, stdin.readline().split())
def nl(): return list(map(int, stdin.readline().split()))


n, k = nm()
p = 0
for i in range(1, n + 1):
    if i >= k:
        p += 1 / n
    else:
        num = ceil(log2(k / i))
        p += (1 / n) * (1 / pow(2, num))

print(p)