M,N = map(int,input().split()) a = 1 for i in range(N): M *= 3 M += a M /= 3 print(M/a)