m,n=map(int,input().split()) ans = m for i in range(n): t = 0 t += ans*2 / 3 t += (ans+1) / 3 ans = t print(ans)