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

ans = 0
for i in range(N):
  tmp = i+1
  count = 0
  while tmp < K:
    tmp *= 2
    count += 1
  ans += 1/(2**count)
ans *= (1/N)
print(ans) import math math from decimal import Decimal 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(N):
  tmp = i+1
  count = 0
  while tmp < K:
    tmp *= 2
    count += 1
  ans += 1/(2**count) i range(N) range N tmp = i+1 tmp i+1 i 1 count = 0 count 0 while tmp < K:
    tmp *= 2
    count += 1
   tmp < K tmp K tmp *= 2 tmp 2 count += 1 count 1 ans += 1/(2**count) ans 1/(2**count) 1 2**count 2 count ans *= (1/N) ans 1/N 1 N print(ans) print ans tmp = i+1 i+1 tmp count += 1 1 count ans *= (1/N) 1/N ans ans += 1/(2**count) 1/(2**count) ans count = 0 0 count N, K = map(int, input().split()) map(int, input().split()) N K = map(int, input().split()) map(int, input().split()) K ans = 0 0 ans tmp *= 2 2 tmp
import math
from decimal import Decimal
N, K = map(int, input().split())

ans = 0
for i in range(N):
  tmp = i+1
  count = 0
  while tmp < K:
    tmp *= 2
    count += 1
  ans += 1/(2**count)
ans *= (1/N)
print(ans)
