#include <iostream>

using namespace std;

int main () {
  long long a, b, n;
  cin >> a >> b >> n;

  cout << a + b << ' ';
  int x = 0;
  while (n > 2) {
    x += 1;
    n -= n / 2;
  }
  long long nr = (1LL<<(long long)x) + 1LL;
  cout << a * nr + b << '\n';

  return 0;
}