import sys sys.setrecursionlimit(100000000) MOD = 10 ** 9 + 7 INF = 10 ** 15 dy = (-1,0,1,0) dx = (0,1,0,-1) def main(): M,N = map(int,input().split()) value = M for _ in range(N): next_value = 0 next_value += value*2/3 next_value += (value + 1)/3 value = next_value print(value) if __name__ == '__main__': main()