import sys sys.setrecursionlimit(10000) def knapsack(m, n): if n !=0: exp_n = (3*knapsack(m, n-1)+1) / 3 elif n == 0: exp_n = m return exp_n m, n = map(int, input().split()) print(knapsack(m, n))