import math
N,K = map(int,input().split())
P = max((N-K+1)/N,0)
cnt = 0
for k in range(1,min(N,K-1)+1):
    cnt += 2**(-math.ceil(math.log2(K/k)))
cnt = cnt/N
P += cnt
print(P) import math math N,K = map(int,input().split()) N map(int,input().split()) map int input().split() ().split () input split K P = max((N-K+1)/N,0) P max((N-K+1)/N,0) max (N-K+1)/N N-K+1 N-K N K 1 N 0 cnt = 0 cnt 0 for k in range(1,min(N,K-1)+1):
    cnt += 2**(-math.ceil(math.log2(K/k))) k range(1,min(N,K-1)+1) range 1 min(N,K-1)+1 min(N,K-1) min N K-1 K 1 1 cnt += 2**(-math.ceil(math.log2(K/k))) cnt 2**(-math.ceil(math.log2(K/k))) 2 -math.ceil(math.log2(K/k)) math.ceil(math.log2(K/k)) math.ceil math ceil math.log2(K/k) math.log2 math log2 K/k K k cnt = cnt/N cnt cnt/N cnt N P += cnt P cnt print(P) print P cnt += 2**(-math.ceil(math.log2(K/k))) 2**(-math.ceil(math.log2(K/k))) cnt K = map(int,input().split()) map(int,input().split()) K cnt = 0 0 cnt P += cnt cnt P N,K = map(int,input().split()) map(int,input().split()) N P = max((N-K+1)/N,0) max((N-K+1)/N,0) P cnt = cnt/N cnt/N cnt
import math
N,K = map(int,input().split())
P = max((N-K+1)/N,0)
cnt = 0
for k in range(1,min(N,K-1)+1):
    cnt += 2**(-math.ceil(math.log2(K/k)))
cnt = cnt/N
P += cnt
print(P)