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

ans = 0

for i in range(1,N+1):
  if i <= K:
    ans+=1/N*0.5**(math.ceil(math.log2(K/i)))
  else:
    ans+=1/N
    
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*0.5**(math.ceil(math.log2(K/i)))
  else:
    ans+=1/N
     i range(1,N+1) range 1 N+1 N 1 if i <= K:
    ans+=1/N*0.5**(math.ceil(math.log2(K/i)))
  else:
    ans+=1/N
     i <= K i K ans+=1/N*0.5**(math.ceil(math.log2(K/i))) ans 1/N*0.5**(math.ceil(math.log2(K/i))) 1/N 1 N 0.5**(math.ceil(math.log2(K/i))) 0.5 math.ceil(math.log2(K/i)) math.ceil math ceil math.log2(K/i) math.log2 math log2 K/i K i ans+=1/N ans 1/N 1 N print(ans) print ans N, K = map(int, input().split()) map(int, input().split()) N ans+=1/N 1/N ans ans = 0 0 ans ans+=1/N*0.5**(math.ceil(math.log2(K/i))) 1/N*0.5**(math.ceil(math.log2(K/i))) ans 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*0.5**(math.ceil(math.log2(K/i)))
  else:
    ans+=1/N
    
print(ans)