import sys, math
from collections import defaultdict, deque, Counter
from bisect import bisect_left, bisect_right
from itertools import combinations, permutations, product
from heapq import heappush, heappop
from functools import lru_cache
input = sys.stdin.readline
rs = lambda: input().strip()
ri = lambda: int(input())
rl = lambda: list(map(int, input().split()))
mat = lambda x, y, v: [[v]*y for _ in range(x)]
ten = lambda x, y, z, v: [mat(y, z, v) for _ in range(x)]
mod = 1000000007
sys.setrecursionlimit(1000000)

N, K = rl()

ans = 0
for i in range(1, N+1):
	if i >= K:
		ans += 1/N
	else:
		n = math.ceil(math.log(K/i)/math.log(2))
		ans += 1/pow(2, n)/N
print(ans)
 import sys, math sys math from collections import defaultdict, deque, Counter from bisect import bisect_left, bisect_right from itertools import combinations, permutations, product from heapq import heappush, heappop from functools import lru_cache input = sys.stdin.readline input sys.stdin.readline sys.stdin sys stdin readline rs = lambda: input().strip() rs lambda: input().strip() input().strip() ().strip () input strip ri = lambda: int(input()) ri lambda: int(input()) int(input()) int input() input rl = lambda: list(map(int, input().split())) rl lambda: list(map(int, input().split())) list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split [v]*y for _ in range(x) for _ in range(x) _ range(x) range x for _ in range(x) [v]*y [v] v y mat = lambda x, y, v: [[v]*y for _ in range(x)] mat lambda x, y, v: [[v]*y for _ in range(x)] [[v]*y for _ in range(x)] x y v mat(y, z, v) for _ in range(x) for _ in range(x) _ range(x) range x for _ in range(x) mat(y, z, v) mat y z v ten = lambda x, y, z, v: [mat(y, z, v) for _ in range(x)] ten lambda x, y, z, v: [mat(y, z, v) for _ in range(x)] [mat(y, z, v) for _ in range(x)] x y z v mod = 1000000007 mod 1000000007 sys.setrecursionlimit(1000000) sys.setrecursionlimit sys setrecursionlimit 1000000 N, K = rl() N rl() rl K ans = 0 ans 0 for i in range(1, N+1):
	if i >= K:
		ans += 1/N
	else:
		n = math.ceil(math.log(K/i)/math.log(2))
		ans += 1/pow(2, n)/N i range(1, N+1) range 1 N+1 N 1 if i >= K:
		ans += 1/N
	else:
		n = math.ceil(math.log(K/i)/math.log(2))
		ans += 1/pow(2, n)/N i >= K i K ans += 1/N ans 1/N 1 N n = math.ceil(math.log(K/i)/math.log(2)) n math.ceil(math.log(K/i)/math.log(2)) math.ceil math ceil math.log(K/i)/math.log(2) math.log(K/i) math.log math log K/i K i math.log(2) math.log math log 2 ans += 1/pow(2, n)/N ans 1/pow(2, n)/N 1/pow(2, n) 1 pow(2, n) pow 2 n N print(ans) print ans ten = lambda x, y, z, v: [mat(y, z, v) for _ in range(x)] lambda x, y, z, v: [mat(y, z, v) for _ in range(x)] ten K = rl() rl() K N, K = rl() rl() N n = math.ceil(math.log(K/i)/math.log(2)) math.ceil(math.log(K/i)/math.log(2)) n ans += 1/pow(2, n)/N 1/pow(2, n)/N ans ri = lambda: int(input()) lambda: int(input()) ri rs = lambda: input().strip() lambda: input().strip() rs mat = lambda x, y, v: [[v]*y for _ in range(x)] lambda x, y, v: [[v]*y for _ in range(x)] mat mod = 1000000007 1000000007 mod ans += 1/N 1/N ans input = sys.stdin.readline sys.stdin.readline input ans = 0 0 ans rl = lambda: list(map(int, input().split())) lambda: list(map(int, input().split())) rl
import sys, math
from collections import defaultdict, deque, Counter
from bisect import bisect_left, bisect_right
from itertools import combinations, permutations, product
from heapq import heappush, heappop
from functools import lru_cache
input = sys.stdin.readline
rs = lambda: input().strip()
ri = lambda: int(input())
rl = lambda: list(map(int, input().split()))
mat = lambda x, y, v: [[v]*y for _ in range(x)]
ten = lambda x, y, z, v: [mat(y, z, v) for _ in range(x)]
mod = 1000000007
sys.setrecursionlimit(1000000)

N, K = rl()

ans = 0
for i in range(1, N+1):
	if i >= K:
		ans += 1/N
	else:
		n = math.ceil(math.log(K/i)/math.log(2))
		ans += 1/pow(2, n)/N
print(ans)

