import sys

import math

sys.setrecursionlimit(10**6)

from collections import defaultdict



n,k=list(map(int,input().split()))

ans=0

for i in range(1,n+1):

    if i>=k:

        ans+=1/n

    else:

        ans+=1/(n*2**int(1-1/(10**9)+math.log((k/i),2)))

#print(i,2**int(math.log((k/i),2)),ans)

print(ans)

n,k=list(map(int,input().split()))

a=0

for i in range(n):

 x=i+1;y=0

 while x<k:x*=2;y+=1

 a+=1/2**y

print((a/n))
import sys
import math

sys.setrecursionlimit(10**6)
from collections import defaultdict

n, k = list(map(int, input().split()))
ans = 0
for i in range(1, n + 1):
    if i >= k:
        ans += 1 / n
    else:
        ans += 1 / (n * 2 ** int(1 - 1 / (10**9) + math.log((k / i), 2)))
# print(i,2**int(math.log((k/i),2)),ans)
print(ans)

n, k = list(map(int, input().split()))
a = 0
for i in range(n):
    x = i + 1
    y = 0
    while x < k:
        x *= 2
        y += 1
    a += 1 / 2**y
print((a / n))

-import sys -import math - -sys.setrecursionlimit(10**6) -from collections import defaultdict - -ans = 0 -for i in range(1, n + 1): -    if i >= k: -        ans += 1 / n -    else: -        ans += 1 / (n * 2 ** int(1 - 1 / (10**9) + math.log((k / i), 2))) -# print(i,2**int(math.log((k/i),2)),ans) -print(ans) +a = 0 +for i in range(n): +    x = i + 1 +    y = 0 +    while x < k: +        x *= 2 +        y += 1 +    a += 1 / 2**y +print((a / n))