v = raw_input().split(' ') a = int(v[0]) b = int(v[1]) n = int(v[2]) x = 1 while x * 2 + 1 <= n: x *= 2 print a + b, b + a * (x + 1)