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

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

if __name__ == "__main__":
    main()
