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

ans = 0
for i in range(1, K):
    if i > N:
        break
    x = math.ceil(math.log2(K/i))
    p = (1/2)**x
    ans += p

ans *= 1/N

if N >= K:
    ans += (N-K+1)/N

print("{:.10f}".format(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, K):
    if i > N:
        break
    x = math.ceil(math.log2(K/i))
    p = (1/2)**x
    ans += p i range(1, K) range 1 K if i > N:
        break
     i > N i N break x = math.ceil(math.log2(K/i)) x math.ceil(math.log2(K/i)) math.ceil math ceil math.log2(K/i) math.log2 math log2 K/i K i p = (1/2)**x p (1/2)**x 1/2 1 2 x ans += p ans p ans *= 1/N ans 1/N 1 N if N >= K:
    ans += (N-K+1)/N N >= K N K ans += (N-K+1)/N ans (N-K+1)/N N-K+1 N-K N K 1 N print("{:.10f}".format(ans)) print "{:.10f}".format(ans) "{:.10f}".format "{:.10f}" format ans x = math.ceil(math.log2(K/i)) math.ceil(math.log2(K/i)) x ans *= 1/N 1/N ans K = map(int, input().split()) map(int, input().split()) K N, K = map(int, input().split()) map(int, input().split()) N ans += (N-K+1)/N (N-K+1)/N ans ans = 0 0 ans p = (1/2)**x (1/2)**x p ans += p p ans
import math
N, K = map(int, input().split())

ans = 0
for i in range(1, K):
    if i > N:
        break
    x = math.ceil(math.log2(K/i))
    p = (1/2)**x
    ans += p

ans *= 1/N

if N >= K:
    ans += (N-K+1)/N

print("{:.10f}".format(ans))
