#n = int(input())
import math
n, k = map(int, input().split())
#al = list(map(int, input().split()))
#al=[list(input()) for i in range(h)]

ans = 0

for i in range(1, n+1):
    if i>=k:
        heads_num=0
    else:
        heads_num = math.ceil(math.log2(k/i))
    add = (1/n)*((0.5)**heads_num)
    ans += add
    #ans += (1/n)*((0.5)**heads_num)

print('{:.12f}'.format(ans)) import math math n, k = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split k ans = 0 ans 0 for i in range(1, n+1):
    if i>=k:
        heads_num=0
    else:
        heads_num = math.ceil(math.log2(k/i))
    add = (1/n)*((0.5)**heads_num)
    ans += add
    #ans += (1/n)*((0.5)**heads_num) i range(1, n+1) range 1 n+1 n 1 if i>=k:
        heads_num=0
    else:
        heads_num = math.ceil(math.log2(k/i))
     i>=k i k heads_num=0 heads_num 0 heads_num = math.ceil(math.log2(k/i)) heads_num math.ceil(math.log2(k/i)) math.ceil math ceil math.log2(k/i) math.log2 math log2 k/i k i add = (1/n)*((0.5)**heads_num) add (1/n)*((0.5)**heads_num) 1/n 1 n (0.5)**heads_num 0.5 heads_num ans += add ans add print('{:.12f}'.format(ans)) print '{:.12f}'.format(ans) '{:.12f}'.format '{:.12f}' format ans heads_num = math.ceil(math.log2(k/i)) math.ceil(math.log2(k/i)) heads_num n, k = map(int, input().split()) map(int, input().split()) n heads_num=0 0 heads_num ans = 0 0 ans add = (1/n)*((0.5)**heads_num) (1/n)*((0.5)**heads_num) add ans += add add ans k = map(int, input().split()) map(int, input().split()) k
#n = int(input())
import math
n, k = map(int, input().split())
#al = list(map(int, input().split()))
#al=[list(input()) for i in range(h)]

ans = 0

for i in range(1, n+1):
    if i>=k:
        heads_num=0
    else:
        heads_num = math.ceil(math.log2(k/i))
    add = (1/n)*((0.5)**heads_num)
    ans += add
    #ans += (1/n)*((0.5)**heads_num)

print('{:.12f}'.format(ans))
