from collections import defaultdict
from collections import deque
import itertools
import math

def readInt():
	return int(input())
def readInts():
	return list(map(int, input().split()))
def readChar():
	return input()
def readChars():
	return input().split()

n,k = readInts()

x = 0

for i in range(1,n+1):
	t=min(1/(2**math.ceil(math.log2(k)-math.log2(i))),1)
	x+=t
	#print(t)

print(x/n) from collections import defaultdict from collections import deque import itertools itertools import math math def readInt():
	return int(input()) readInt return int(input()) int(input()) int input() input def readInts():
	return list(map(int, input().split())) readInts return list(map(int, input().split())) list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split def readChar():
	return input() readChar return input() input() input def readChars():
	return input().split() readChars return input().split() input().split() ().split () input split n,k = readInts() n readInts() readInts k x = 0 x 0 for i in range(1,n+1):
	t=min(1/(2**math.ceil(math.log2(k)-math.log2(i))),1)
	x+=t
	#print(t) i range(1,n+1) range 1 n+1 n 1 t=min(1/(2**math.ceil(math.log2(k)-math.log2(i))),1) t min(1/(2**math.ceil(math.log2(k)-math.log2(i))),1) min 1/(2**math.ceil(math.log2(k)-math.log2(i))) 1 2**math.ceil(math.log2(k)-math.log2(i)) 2 math.ceil(math.log2(k)-math.log2(i)) math.ceil math ceil math.log2(k)-math.log2(i) math.log2(k) math.log2 math log2 k math.log2(i) math.log2 math log2 i 1 x+=t x t print(x/n) print x/n x n def readInt():
	return int(input()) def readInt():
	return int(input()) readInt k = readInts() readInts() k x+=t t x def readChars():
	return input().split() def readChars():
	return input().split() readChars x = 0 0 x def readInts():
	return list(map(int, input().split())) def readInts():
	return list(map(int, input().split())) readInts n,k = readInts() readInts() n def readChar():
	return input() def readChar():
	return input() readChar t=min(1/(2**math.ceil(math.log2(k)-math.log2(i))),1) min(1/(2**math.ceil(math.log2(k)-math.log2(i))),1) t
from collections import defaultdict
from collections import deque
import itertools
import math

def readInt():
	return int(input())
def readInts():
	return list(map(int, input().split()))
def readChar():
	return input()
def readChars():
	return input().split()

n,k = readInts()

x = 0

for i in range(1,n+1):
	t=min(1/(2**math.ceil(math.log2(k)-math.log2(i))),1)
	x+=t
	#print(t)

print(x/n)