def fun(m, n): for _ in range(n): m = (3 * m + 1) / 3 return round(m, 9) print(fun(*map(int, input().split())))