temp=input().split()

N=int(temp[0])

K=int(temp[1])



r=[]

for i in range(1, N+1):

  temp=i

  counter=0

  while temp<K:

    temp*=2

    counter+=1

    

  r.append(counter)

    

print((sum([pow(0.5, r[i]) for i in range(N)])/N))
N, K=list(map(int, input().split()))



prob=0

for i in range(1, N+1):

  counter=0

  while i*pow(2, counter)<K:

    counter+=1

    

  prob+=pow(1/2, counter)/N

  

print(prob)
temp = input().split()
N = int(temp[0])
K = int(temp[1])
r = []
for i in range(1, N + 1):
    temp = i
    counter = 0
    while temp < K:
        temp *= 2
        counter += 1
    r.append(counter)
print((sum([pow(0.5, r[i]) for i in range(N)]) / N))

N, K = list(map(int, input().split()))
prob = 0
for i in range(1, N + 1):
    counter = 0
    while i * pow(2, counter) < K:
        counter += 1
    prob += pow(1 / 2, counter) / N
print(prob)

-temp = input().split() -N = int(temp[0]) -K = int(temp[1]) -r = [] +N, K = list(map(int, input().split())) +prob = 0 -    temp = i -    while temp < K: -        temp *= 2 +    while i * pow(2, counter) < K: -    r.append(counter) -print((sum([pow(0.5, r[i]) for i in range(N)]) / N)) +    prob += pow(1 / 2, counter) / N +print(prob)