import math

N, K = map(int, input().split())
probability = 0

for n in range(1, N + 1):
	if n < K:
		p = math.ceil((math.log2(K / n )))
		probability = probability + 1/((2**p)*N)
	else:
		probability = probability + 1 / N

print(probability) import math math N, K = map(int, input().split()) N map(int, input().split()) map int input().split() ().split () input split K probability = 0 probability 0 for n in range(1, N + 1):
	if n < K:
		p = math.ceil((math.log2(K / n )))
		probability = probability + 1/((2**p)*N)
	else:
		probability = probability + 1 / N n range(1, N + 1) range 1 N + 1 N 1 if n < K:
		p = math.ceil((math.log2(K / n )))
		probability = probability + 1/((2**p)*N)
	else:
		probability = probability + 1 / N n < K n K p = math.ceil((math.log2(K / n ))) p math.ceil((math.log2(K / n ))) math.ceil math ceil math.log2(K / n ) math.log2 math log2 K / n K n probability = probability + 1/((2**p)*N) probability probability + 1/((2**p)*N) probability 1/((2**p)*N) 1 (2**p)*N 2**p 2 p N probability = probability + 1 / N probability probability + 1 / N probability 1 / N 1 N print(probability) print probability probability = probability + 1 / N probability + 1 / N probability K = map(int, input().split()) map(int, input().split()) K probability = probability + 1/((2**p)*N) probability + 1/((2**p)*N) probability N, K = map(int, input().split()) map(int, input().split()) N p = math.ceil((math.log2(K / n ))) math.ceil((math.log2(K / n ))) p probability = 0 0 probability
import math

N, K = map(int, input().split())
probability = 0

for n in range(1, N + 1):
	if n < K:
		p = math.ceil((math.log2(K / n )))
		probability = probability + 1/((2**p)*N)
	else:
		probability = probability + 1 / N

print(probability)