import math
n, k = map(int, input().split())
ans = 0.0
if n >= k:
  ans += (n-k+1)/n
  
for i in range(1, min(n+1, k)):
  now = i
  p = 1/n
  while(now <k):
    now *= 2
    p /= 2
  ans += p
  
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.0 ans 0.0 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 for i in range(1, min(n+1, k)):
  now = i
  p = 1/n
  while(now <k):
    now *= 2
    p /= 2
  ans += p
   i range(1, min(n+1, k)) range 1 min(n+1, k) min n+1 n 1 k now = i now i p = 1/n p 1/n 1 n while(now <k):
    now *= 2
    p /= 2
   now <k now k now *= 2 now 2 p /= 2 p 2 ans += p ans p print(ans) print ans p /= 2 2 p n, k = map(int, input().split()) map(int, input().split()) n ans += p p ans ans += (n-k+1)/n (n-k+1)/n ans p = 1/n 1/n p ans = 0.0 0.0 ans k = map(int, input().split()) map(int, input().split()) k now *= 2 2 now now = i i now
import math
n, k = map(int, input().split())
ans = 0.0
if n >= k:
  ans += (n-k+1)/n
  
for i in range(1, min(n+1, k)):
  now = i
  p = 1/n
  while(now <k):
    now *= 2
    p /= 2
  ans += p
  
print(ans)