import math
a=0
N, K = map(int,input().split())
for i in range(1, N+1):
    if i < K:
        a += (1/2)**(math.ceil(math.log2(K/i)))
    else:
        a = a + 1
a =a/N
print(a) import math math a=0 a 0 N, K = map(int,input().split()) N map(int,input().split()) map int input().split() ().split () input split K for i in range(1, N+1):
    if i < K:
        a += (1/2)**(math.ceil(math.log2(K/i)))
    else:
        a = a + 1 i range(1, N+1) range 1 N+1 N 1 if i < K:
        a += (1/2)**(math.ceil(math.log2(K/i)))
    else:
        a = a + 1 i < K i K a += (1/2)**(math.ceil(math.log2(K/i))) a (1/2)**(math.ceil(math.log2(K/i))) 1/2 1 2 math.ceil(math.log2(K/i)) math.ceil math ceil math.log2(K/i) math.log2 math log2 K/i K i a = a + 1 a a + 1 a 1 a =a/N a a/N a N print(a) print a a += (1/2)**(math.ceil(math.log2(K/i))) (1/2)**(math.ceil(math.log2(K/i))) a a=0 0 a a =a/N a/N a K = map(int,input().split()) map(int,input().split()) K N, K = map(int,input().split()) map(int,input().split()) N a = a + 1 a + 1 a
import math
a=0
N, K = map(int,input().split())
for i in range(1, N+1):
    if i < K:
        a += (1/2)**(math.ceil(math.log2(K/i)))
    else:
        a = a + 1
a =a/N
print(a)