import sys
import math
ans = 0
N,K = map(int,input().split())
for n in range(1,N+1):
    num = max(0, math.ceil(math.log2(K/n)))
    ans += (1/2)**num

print(ans/N) import sys sys import math math ans = 0 ans 0 N,K = map(int,input().split()) N map(int,input().split()) map int input().split() ().split () input split K for n in range(1,N+1):
    num = max(0, math.ceil(math.log2(K/n)))
    ans += (1/2)**num n range(1,N+1) range 1 N+1 N 1 num = max(0, math.ceil(math.log2(K/n))) num max(0, math.ceil(math.log2(K/n))) max 0 math.ceil(math.log2(K/n)) math.ceil math ceil math.log2(K/n) math.log2 math log2 K/n K n ans += (1/2)**num ans (1/2)**num 1/2 1 2 num print(ans/N) print ans/N ans N ans += (1/2)**num (1/2)**num ans K = map(int,input().split()) map(int,input().split()) K N,K = map(int,input().split()) map(int,input().split()) N ans = 0 0 ans num = max(0, math.ceil(math.log2(K/n))) max(0, math.ceil(math.log2(K/n))) num
import sys
import math
ans = 0
N,K = map(int,input().split())
for n in range(1,N+1):
    num = max(0, math.ceil(math.log2(K/n)))
    ans += (1/2)**num

print(ans/N)