

def main():
    n, k = map(int, input().split())
    ans = 0.0
    for t in range(1, n + 1):
        cnt = 0
        now = t
        per = 1.0
        while now < k:
            per /= 2
            now *= 2
        ans += per / n
    print('{:.20}'.format(ans))
    pass


if __name__ == '__main__':
    main() def main():
    n, k = map(int, input().split())
    ans = 0.0
    for t in range(1, n + 1):
        cnt = 0
        now = t
        per = 1.0
        while now < k:
            per /= 2
            now *= 2
        ans += per / n
    print('{:.20}'.format(ans))
    pass main n, k = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split k ans = 0.0 ans 0.0 for t in range(1, n + 1):
        cnt = 0
        now = t
        per = 1.0
        while now < k:
            per /= 2
            now *= 2
        ans += per / n
     t range(1, n + 1) range 1 n + 1 n 1 cnt = 0 cnt 0 now = t now t per = 1.0 per 1.0 while now < k:
            per /= 2
            now *= 2
         now < k now k per /= 2 per 2 now *= 2 now 2 ans += per / n ans per / n per n print('{:.20}'.format(ans)) print '{:.20}'.format(ans) '{:.20}'.format '{:.20}' format ans if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main def main():
    n, k = map(int, input().split())
    ans = 0.0
    for t in range(1, n + 1):
        cnt = 0
        now = t
        per = 1.0
        while now < k:
            per /= 2
            now *= 2
        ans += per / n
    print('{:.20}'.format(ans))
    pass def main():
    n, k = map(int, input().split())
    ans = 0.0
    for t in range(1, n + 1):
        cnt = 0
        now = t
        per = 1.0
        while now < k:
            per /= 2
            now *= 2
        ans += per / n
    print('{:.20}'.format(ans))
    pass main


def main():
    n, k = map(int, input().split())
    ans = 0.0
    for t in range(1, n + 1):
        cnt = 0
        now = t
        per = 1.0
        while now < k:
            per /= 2
            now *= 2
        ans += per / n
    print('{:.20}'.format(ans))
    pass


if __name__ == '__main__':
    main()
