import math
N, K = map(int,input().split())

ans = 0

for i in range(1,N+1):
    if(i >= K):
        ans += 1/N
    else:
        ans += 1/N * pow(0.5, math.ceil(math.log2(K/i)))

print(ans)
 import math math N, K = map(int,input().split()) N map(int,input().split()) map int input().split() ().split () input split K ans = 0 ans 0 for i in range(1,N+1):
    if(i >= K):
        ans += 1/N
    else:
        ans += 1/N * pow(0.5, math.ceil(math.log2(K/i))) i range(1,N+1) range 1 N+1 N 1 if(i >= K):
        ans += 1/N
    else:
        ans += 1/N * pow(0.5, math.ceil(math.log2(K/i))) i >= K i K ans += 1/N ans 1/N 1 N ans += 1/N * pow(0.5, math.ceil(math.log2(K/i))) ans 1/N * pow(0.5, math.ceil(math.log2(K/i))) 1/N 1 N pow(0.5, math.ceil(math.log2(K/i))) pow 0.5 math.ceil(math.log2(K/i)) math.ceil math ceil math.log2(K/i) math.log2 math log2 K/i K i print(ans) print ans ans += 1/N * pow(0.5, math.ceil(math.log2(K/i))) 1/N * pow(0.5, math.ceil(math.log2(K/i))) ans ans = 0 0 ans ans += 1/N 1/N ans N, K = map(int,input().split()) map(int,input().split()) N K = map(int,input().split()) map(int,input().split()) K
import math
N, K = map(int,input().split())

ans = 0

for i in range(1,N+1):
    if(i >= K):
        ans += 1/N
    else:
        ans += 1/N * pow(0.5, math.ceil(math.log2(K/i)))

print(ans)

