def INT():
    return int(input())

def MI():
    return map(int, input().split())

def LI():
    return list(map(int, input().split()))

N, K = MI()
p = 0

for i in range(1, N + 1):
    p_i = 1 / N
    ex = 0
    
    if i < K: 
        while 1:
            ex += 1
            if i * pow(2, ex) >= K:
                break
    
    p += p_i * (1 / 2)**ex
    
print(p) def INT():
    return int(input()) INT return int(input()) int(input()) int input() input def MI():
    return map(int, input().split()) MI return map(int, input().split()) map(int, input().split()) map int input().split() ().split () input split def LI():
    return list(map(int, input().split())) LI return list(map(int, input().split())) list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split N, K = MI() N MI() MI K p = 0 p 0 for i in range(1, N + 1):
    p_i = 1 / N
    ex = 0
    
    if i < K: 
        while 1:
            ex += 1
            if i * pow(2, ex) >= K:
                break
    
    p += p_i * (1 / 2)**ex
     i range(1, N + 1) range 1 N + 1 N 1 p_i = 1 / N p_i 1 / N 1 N ex = 0 ex 0 if i < K: 
        while 1:
            ex += 1
            if i * pow(2, ex) >= K:
                break
    
     i < K i K while 1:
            ex += 1
            if i * pow(2, ex) >= K:
                break
    
     1 ex += 1 ex 1 if i * pow(2, ex) >= K:
                break
    
     i * pow(2, ex) >= K i * pow(2, ex) i pow(2, ex) pow 2 ex K break p += p_i * (1 / 2)**ex p p_i * (1 / 2)**ex p_i (1 / 2)**ex 1 / 2 1 2 ex print(p) print p p = 0 0 p p += p_i * (1 / 2)**ex p_i * (1 / 2)**ex p def INT():
    return int(input()) def INT():
    return int(input()) INT N, K = MI() MI() N p_i = 1 / N 1 / N p_i def MI():
    return map(int, input().split()) def MI():
    return map(int, input().split()) MI def LI():
    return list(map(int, input().split())) def LI():
    return list(map(int, input().split())) LI K = MI() MI() K ex = 0 0 ex ex += 1 1 ex
def INT():
    return int(input())

def MI():
    return map(int, input().split())

def LI():
    return list(map(int, input().split()))

N, K = MI()
p = 0

for i in range(1, N + 1):
    p_i = 1 / N
    ex = 0
    
    if i < K: 
        while 1:
            ex += 1
            if i * pow(2, ex) >= K:
                break
    
    p += p_i * (1 / 2)**ex
    
print(p)