#ABC126 C

import math
N,K = map(int,input().split())
P = 0
for i in range(1,N+1):
    if i >= K:
        P += 1/N
    else:
        P += (1/N)*(0.5)**(math.ceil(math.log(K/i,2)))
        
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 = 0 P 0 for i in range(1,N+1):
    if i >= K:
        P += 1/N
    else:
        P += (1/N)*(0.5)**(math.ceil(math.log(K/i,2)))
         i range(1,N+1) range 1 N+1 N 1 if i >= K:
        P += 1/N
    else:
        P += (1/N)*(0.5)**(math.ceil(math.log(K/i,2)))
         i >= K i K P += 1/N P 1/N 1 N P += (1/N)*(0.5)**(math.ceil(math.log(K/i,2))) P (1/N)*(0.5)**(math.ceil(math.log(K/i,2))) 1/N 1 N (0.5)**(math.ceil(math.log(K/i,2))) 0.5 math.ceil(math.log(K/i,2)) math.ceil math ceil math.log(K/i,2) math.log math log K/i K i 2 print(P) print P P += (1/N)*(0.5)**(math.ceil(math.log(K/i,2))) (1/N)*(0.5)**(math.ceil(math.log(K/i,2))) P P = 0 0 P P += 1/N 1/N P K = map(int,input().split()) map(int,input().split()) K N,K = map(int,input().split()) map(int,input().split()) N
#ABC126 C

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