import math
from math import gcd
INF = float("inf")

import sys
input=sys.stdin.readline
sys.setrecursionlimit(500*500)
import itertools
from collections import Counter,deque

def main():
    n, k =  map(int, input().split())
    ans = 0

    for i in range(1, n+1):
        for j in range(100):
            if i*2**j >= k:
                ans += 0.5**j
                break
    print((1/n)*ans)


if __name__=="__main__":
    main() import math math from math import gcd INF = float("inf") INF float("inf") float "inf" import sys sys input=sys.stdin.readline input sys.stdin.readline sys.stdin sys stdin readline sys.setrecursionlimit(500*500) sys.setrecursionlimit sys setrecursionlimit 500*500 500 500 import itertools itertools from collections import Counter,deque def main():
    n, k =  map(int, input().split())
    ans = 0

    for i in range(1, n+1):
        for j in range(100):
            if i*2**j >= k:
                ans += 0.5**j
                break
    print((1/n)*ans) main 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):
        for j in range(100):
            if i*2**j >= k:
                ans += 0.5**j
                break
     i range(1, n+1) range 1 n+1 n 1 for j in range(100):
            if i*2**j >= k:
                ans += 0.5**j
                break
     j range(100) range 100 if i*2**j >= k:
                ans += 0.5**j
                break
     i*2**j >= k i*2**j i 2**j 2 j k ans += 0.5**j ans 0.5**j 0.5 j break print((1/n)*ans) print (1/n)*ans 1/n 1 n ans if __name__=="__main__":
    main() __name__=="__main__" __name__ "__main__" main() main INF = float("inf") float("inf") INF def main():
    n, k =  map(int, input().split())
    ans = 0

    for i in range(1, n+1):
        for j in range(100):
            if i*2**j >= k:
                ans += 0.5**j
                break
    print((1/n)*ans) def main():
    n, k =  map(int, input().split())
    ans = 0

    for i in range(1, n+1):
        for j in range(100):
            if i*2**j >= k:
                ans += 0.5**j
                break
    print((1/n)*ans) main input=sys.stdin.readline sys.stdin.readline input
import math
from math import gcd
INF = float("inf")

import sys
input=sys.stdin.readline
sys.setrecursionlimit(500*500)
import itertools
from collections import Counter,deque

def main():
    n, k =  map(int, input().split())
    ans = 0

    for i in range(1, n+1):
        for j in range(100):
            if i*2**j >= k:
                ans += 0.5**j
                break
    print((1/n)*ans)


if __name__=="__main__":
    main()
