import sys
input = lambda: sys.stdin.readline().rstrip()
from decimal import *

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

x = Decimal("0.5")
ans = 0
for i in range(1, N+1):
    p = 1
    while i < K:
        i *= 2
        p *= x
    ans += p   
ans /= N
print(ans) import sys sys input = lambda: sys.stdin.readline().rstrip() input lambda: sys.stdin.readline().rstrip() sys.stdin.readline().rstrip() sys.stdin.readline().rstrip sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline rstrip from decimal import * N, K = map(int, input().split()) N map(int, input().split()) map int input().split() ().split () input split K x = Decimal("0.5") x Decimal("0.5") Decimal "0.5" ans = 0 ans 0 for i in range(1, N+1):
    p = 1
    while i < K:
        i *= 2
        p *= x
    ans += p    i range(1, N+1) range 1 N+1 N 1 p = 1 p 1 while i < K:
        i *= 2
        p *= x
     i < K i K i *= 2 i 2 p *= x p x ans += p ans p ans /= N ans N print(ans) print ans ans = 0 0 ans p = 1 1 p p *= x x p x = Decimal("0.5") Decimal("0.5") x input = lambda: sys.stdin.readline().rstrip() lambda: sys.stdin.readline().rstrip() input K = map(int, input().split()) map(int, input().split()) K N, K = map(int, input().split()) map(int, input().split()) N i *= 2 2 i ans /= N N ans ans += p p ans
import sys
input = lambda: sys.stdin.readline().rstrip()
from decimal import *

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

x = Decimal("0.5")
ans = 0
for i in range(1, N+1):
    p = 1
    while i < K:
        i *= 2
        p *= x
    ans += p   
ans /= N
print(ans)