def main():
    import math
    n, k = map(int,input().split())
    kakuritsu = 0
    for i in range(1, n+1):
        kaisuu = math.ceil(math.log2(k/i))
        if i > k:
            kakuritsu += 1/n
        else:
            kakuritsu += (1/n) * ((1/2) ** kaisuu)
    print(kakuritsu)



if __name__ == "__main__":
    main() def main():
    import math
    n, k = map(int,input().split())
    kakuritsu = 0
    for i in range(1, n+1):
        kaisuu = math.ceil(math.log2(k/i))
        if i > k:
            kakuritsu += 1/n
        else:
            kakuritsu += (1/n) * ((1/2) ** kaisuu)
    print(kakuritsu) main import math math n, k = map(int,input().split()) n map(int,input().split()) map int input().split() ().split () input split k kakuritsu = 0 kakuritsu 0 for i in range(1, n+1):
        kaisuu = math.ceil(math.log2(k/i))
        if i > k:
            kakuritsu += 1/n
        else:
            kakuritsu += (1/n) * ((1/2) ** kaisuu)
     i range(1, n+1) range 1 n+1 n 1 kaisuu = math.ceil(math.log2(k/i)) kaisuu math.ceil(math.log2(k/i)) math.ceil math ceil math.log2(k/i) math.log2 math log2 k/i k i if i > k:
            kakuritsu += 1/n
        else:
            kakuritsu += (1/n) * ((1/2) ** kaisuu)
     i > k i k kakuritsu += 1/n kakuritsu 1/n 1 n kakuritsu += (1/n) * ((1/2) ** kaisuu) kakuritsu (1/n) * ((1/2) ** kaisuu) 1/n 1 n (1/2) ** kaisuu 1/2 1 2 kaisuu print(kakuritsu) print kakuritsu if __name__ == "__main__":
    main() __name__ == "__main__" __name__ "__main__" main() main def main():
    import math
    n, k = map(int,input().split())
    kakuritsu = 0
    for i in range(1, n+1):
        kaisuu = math.ceil(math.log2(k/i))
        if i > k:
            kakuritsu += 1/n
        else:
            kakuritsu += (1/n) * ((1/2) ** kaisuu)
    print(kakuritsu) def main():
    import math
    n, k = map(int,input().split())
    kakuritsu = 0
    for i in range(1, n+1):
        kaisuu = math.ceil(math.log2(k/i))
        if i > k:
            kakuritsu += 1/n
        else:
            kakuritsu += (1/n) * ((1/2) ** kaisuu)
    print(kakuritsu) main
def main():
    import math
    n, k = map(int,input().split())
    kakuritsu = 0
    for i in range(1, n+1):
        kaisuu = math.ceil(math.log2(k/i))
        if i > k:
            kakuritsu += 1/n
        else:
            kakuritsu += (1/n) * ((1/2) ** kaisuu)
    print(kakuritsu)



if __name__ == "__main__":
    main()