#from statistics import median
#import collections
#aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]
from fractions import gcd
from itertools import combinations,permutations,accumulate # (string,3) 3回
#from collections import deque
from collections import deque,defaultdict,Counter
import decimal
import re
#import bisect
#
#    d = m - k[i] - k[j]
#    if kk[bisect.bisect_right(kk,d) - 1] == d:
#
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#
# my_round_int = lambda x:np.round((x*2 + 1)//2)
# 四捨五入
import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7
#mod = 9982443453
def readInts():
  return list(map(int,input().split()))
def I():
  return int(input())
n,k = readInts()
ans = 0
for i in range(1,n+1):
    prob = 1
    base = i
    while base < k:
        base *= 2
        prob /= 2
    ans += prob
print(ans/n) from fractions import gcd from itertools import combinations,permutations,accumulate from collections import deque,defaultdict,Counter import decimal decimal import re re import sys sys sys.setrecursionlimit(10000000) sys.setrecursionlimit sys setrecursionlimit 10000000 mod = 10**9 + 7 mod 10**9 + 7 10**9 10 9 7 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 I():
  return int(input()) I return int(input()) int(input()) int input() input n,k = readInts() n readInts() readInts k ans = 0 ans 0 for i in range(1,n+1):
    prob = 1
    base = i
    while base < k:
        base *= 2
        prob /= 2
    ans += prob i range(1,n+1) range 1 n+1 n 1 prob = 1 prob 1 base = i base i while base < k:
        base *= 2
        prob /= 2
     base < k base k base *= 2 base 2 prob /= 2 prob 2 ans += prob ans prob print(ans/n) print ans/n ans n ans = 0 0 ans prob = 1 1 prob ans += prob prob ans mod = 10**9 + 7 10**9 + 7 mod def readInts():
  return list(map(int,input().split())) def readInts():
  return list(map(int,input().split())) readInts n,k = readInts() readInts() n prob /= 2 2 prob k = readInts() readInts() k base = i i base def I():
  return int(input()) def I():
  return int(input()) I base *= 2 2 base
#from statistics import median
#import collections
#aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]
from fractions import gcd
from itertools import combinations,permutations,accumulate # (string,3) 3回
#from collections import deque
from collections import deque,defaultdict,Counter
import decimal
import re
#import bisect
#
#    d = m - k[i] - k[j]
#    if kk[bisect.bisect_right(kk,d) - 1] == d:
#
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#
# my_round_int = lambda x:np.round((x*2 + 1)//2)
# 四捨五入
import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7
#mod = 9982443453
def readInts():
  return list(map(int,input().split()))
def I():
  return int(input())
n,k = readInts()
ans = 0
for i in range(1,n+1):
    prob = 1
    base = i
    while base < k:
        base *= 2
        prob /= 2
    ans += prob
print(ans/n)
