N, M = map(int, input().split())

if M == 1:
	print(1)
	exit()

import math

prob = 0
for i in range (1, N+1):
	if i>=M:
		prob+=1/N
	else:
		prob+=((1/N)*1/2**math.ceil(math.log(M/i, 2)))

print(prob) N, M = map(int, input().split()) N map(int, input().split()) map int input().split() ().split () input split M if M == 1:
	print(1)
	exit() M == 1 M 1 print(1) print 1 exit() exit import math math prob = 0 prob 0 for i in range (1, N+1):
	if i>=M:
		prob+=1/N
	else:
		prob+=((1/N)*1/2**math.ceil(math.log(M/i, 2))) i range (1, N+1) range 1 N+1 N 1 if i>=M:
		prob+=1/N
	else:
		prob+=((1/N)*1/2**math.ceil(math.log(M/i, 2))) i>=M i M prob+=1/N prob 1/N 1 N prob+=((1/N)*1/2**math.ceil(math.log(M/i, 2))) prob (1/N)*1/2**math.ceil(math.log(M/i, 2)) (1/N)*1 1/N 1 N 1 2**math.ceil(math.log(M/i, 2)) 2 math.ceil(math.log(M/i, 2)) math.ceil math ceil math.log(M/i, 2) math.log math log M/i M i 2 print(prob) print prob N, M = map(int, input().split()) map(int, input().split()) N M = map(int, input().split()) map(int, input().split()) M prob+=((1/N)*1/2**math.ceil(math.log(M/i, 2))) (1/N)*1/2**math.ceil(math.log(M/i, 2)) prob prob = 0 0 prob prob+=1/N 1/N prob
N, M = map(int, input().split())

if M == 1:
	print(1)
	exit()

import math

prob = 0
for i in range (1, N+1):
	if i>=M:
		prob+=1/N
	else:
		prob+=((1/N)*1/2**math.ceil(math.log(M/i, 2)))

print(prob)