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

def main():
    n, k = map(int, input().split())
    ans = 0
    for i in range(1, n+1):
        x = 0
        while i < k:
            x += 1
            i *= 2
        ans += (1 / n) * (1 / 2)**x
    print(ans)
    
if __name__ == '__main__':
    main() 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 def main():
    n, k = map(int, input().split())
    ans = 0
    for i in range(1, n+1):
        x = 0
        while i < k:
            x += 1
            i *= 2
        ans += (1 / n) * (1 / 2)**x
    print(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):
        x = 0
        while i < k:
            x += 1
            i *= 2
        ans += (1 / n) * (1 / 2)**x
     i range(1, n+1) range 1 n+1 n 1 x = 0 x 0 while i < k:
            x += 1
            i *= 2
         i < k i k x += 1 x 1 i *= 2 i 2 ans += (1 / n) * (1 / 2)**x ans (1 / n) * (1 / 2)**x 1 / n 1 n (1 / 2)**x 1 / 2 1 2 x print(ans) print ans if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main def main():
    n, k = map(int, input().split())
    ans = 0
    for i in range(1, n+1):
        x = 0
        while i < k:
            x += 1
            i *= 2
        ans += (1 / n) * (1 / 2)**x
    print(ans)
     def main():
    n, k = map(int, input().split())
    ans = 0
    for i in range(1, n+1):
        x = 0
        while i < k:
            x += 1
            i *= 2
        ans += (1 / n) * (1 / 2)**x
    print(ans)
     main input = lambda: sys.stdin.readline().rstrip() lambda: sys.stdin.readline().rstrip() input
import sys
input = lambda: sys.stdin.readline().rstrip()

def main():
    n, k = map(int, input().split())
    ans = 0
    for i in range(1, n+1):
        x = 0
        while i < k:
            x += 1
            i *= 2
        ans += (1 / n) * (1 / 2)**x
    print(ans)
    
if __name__ == '__main__':
    main()