n,k = list(map(int, input().split()))





win=0

lose=0

COUNT=0

ans=0

for i in range(1,n+1):

    if i>=k:

        win=0

        lose=0

        win+=1

        lose+=n-1

        ans+=float(win/(win+lose))



    elif i<k:

        win=0

        lose=0

        count=n

        win+=1

        while i<k:

            count*=2

            i*=2

        lose=lose+count-1

        ans+=float(win/(win+lose))



print(ans)
n,k = list(map(int, input().split()))



lose=0

ans=0

for i in range(1,n+1):

    if i>=k:

        lose=0

        lose+=n

        ans+=float(1/lose)



    elif i<k:

        lose=0

        count=n

        while i<k:

            count*=2

            i*=2

        lose+=count

        ans+=float(1/lose)



print(ans)
n, k = list(map(int, input().split()))
win = 0
lose = 0
COUNT = 0
ans = 0
for i in range(1, n + 1):
    if i >= k:
        win = 0
        lose = 0
        win += 1
        lose += n - 1
        ans += float(win / (win + lose))
    elif i < k:
        win = 0
        lose = 0
        count = n
        win += 1
        while i < k:
            count *= 2
            i *= 2
        lose = lose + count - 1
        ans += float(win / (win + lose))
print(ans)

n, k = list(map(int, input().split()))
lose = 0
ans = 0
for i in range(1, n + 1):
    if i >= k:
        lose = 0
        lose += n
        ans += float(1 / lose)
    elif i < k:
        lose = 0
        count = n
        while i < k:
            count *= 2
            i *= 2
        lose += count
        ans += float(1 / lose)
print(ans)

-win = 0 -COUNT = 0 -        win = 0 -        win += 1 -        lose += n - 1 -        ans += float(win / (win + lose)) +        lose += n +        ans += float(1 / lose) -        win = 0 -        win += 1 -        lose = lose + count - 1 -        ans += float(win / (win + lose)) +        lose += count +        ans += float(1 / lose)