from math import log2
import decimal

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

decimal.getcontext().prec = 28

ans = decimal.Decimal(0)

for i in range(1, N+1):
    if i < K:
        power = -(-(log2(K) - log2(i))//1)
        prob = decimal.Decimal(1/((2**power) * N))
    else:
        prob = decimal.Decimal(1/N)

    #print(prob)
    ans = decimal.Decimal(ans + prob)
    #print(ans)

print(ans) from math import log2 import decimal decimal N, K = map(int, input().split()) N map(int, input().split()) map int input().split() ().split () input split K decimal.getcontext().prec = 28 decimal.getcontext().prec decimal.getcontext() decimal.getcontext decimal getcontext prec 28 ans = decimal.Decimal(0) ans decimal.Decimal(0) decimal.Decimal decimal Decimal 0 for i in range(1, N+1):
    if i < K:
        power = -(-(log2(K) - log2(i))//1)
        prob = decimal.Decimal(1/((2**power) * N))
    else:
        prob = decimal.Decimal(1/N)

    #print(prob)
    ans = decimal.Decimal(ans + prob)
    #print(ans) i range(1, N+1) range 1 N+1 N 1 if i < K:
        power = -(-(log2(K) - log2(i))//1)
        prob = decimal.Decimal(1/((2**power) * N))
    else:
        prob = decimal.Decimal(1/N)

    #print(prob)
     i < K i K power = -(-(log2(K) - log2(i))//1) power -(-(log2(K) - log2(i))//1) -(log2(K) - log2(i))//1 -(log2(K) - log2(i)) log2(K) - log2(i) log2(K) log2 K log2(i) log2 i 1 prob = decimal.Decimal(1/((2**power) * N)) prob decimal.Decimal(1/((2**power) * N)) decimal.Decimal decimal Decimal 1/((2**power) * N) 1 (2**power) * N 2**power 2 power N prob = decimal.Decimal(1/N) prob decimal.Decimal(1/N) decimal.Decimal decimal Decimal 1/N 1 N ans = decimal.Decimal(ans + prob) ans decimal.Decimal(ans + prob) decimal.Decimal decimal Decimal ans + prob ans prob print(ans) print ans K = map(int, input().split()) map(int, input().split()) K prob = decimal.Decimal(1/((2**power) * N)) decimal.Decimal(1/((2**power) * N)) prob prob = decimal.Decimal(1/N) decimal.Decimal(1/N) prob ans = decimal.Decimal(0) decimal.Decimal(0) ans power = -(-(log2(K) - log2(i))//1) -(-(log2(K) - log2(i))//1) power ans = decimal.Decimal(ans + prob) decimal.Decimal(ans + prob) ans N, K = map(int, input().split()) map(int, input().split()) N
from math import log2
import decimal

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

decimal.getcontext().prec = 28

ans = decimal.Decimal(0)

for i in range(1, N+1):
    if i < K:
        power = -(-(log2(K) - log2(i))//1)
        prob = decimal.Decimal(1/((2**power) * N))
    else:
        prob = decimal.Decimal(1/N)

    #print(prob)
    ans = decimal.Decimal(ans + prob)
    #print(ans)

print(ans)