from math import *

n, k = map(int, input().split())

ans = 0
for i in range(1, n+1):
  tmp = 1 / n
  if i < k:
    tmp *= 0.5 ** ceil(log2(k/i))
  ans += tmp

print(ans) from math import * 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):
  tmp = 1 / n
  if i < k:
    tmp *= 0.5 ** ceil(log2(k/i))
  ans += tmp i range(1, n+1) range 1 n+1 n 1 tmp = 1 / n tmp 1 / n 1 n if i < k:
    tmp *= 0.5 ** ceil(log2(k/i))
   i < k i k tmp *= 0.5 ** ceil(log2(k/i)) tmp 0.5 ** ceil(log2(k/i)) 0.5 ceil(log2(k/i)) ceil log2(k/i) log2 k/i k i ans += tmp ans tmp print(ans) print ans n, k = map(int, input().split()) map(int, input().split()) n tmp = 1 / n 1 / n tmp ans += tmp tmp ans k = map(int, input().split()) map(int, input().split()) k ans = 0 0 ans tmp *= 0.5 ** ceil(log2(k/i)) 0.5 ** ceil(log2(k/i)) tmp
from math import *

n, k = map(int, input().split())

ans = 0
for i in range(1, n+1):
  tmp = 1 / n
  if i < k:
    tmp *= 0.5 ** ceil(log2(k/i))
  ans += tmp

print(ans)