#include <bits/stdc++.h>

using namespace std;



int main() {
	// assert(freopen("removelst.in", "r", stdin));
	// assert(freopen("removelst.out", "w", stdout));
	cin.sync_with_stdio(false);

	int n, a, b;
  cin >> a >> b >> n;

  int step = 1;
  int last = n;
  while (n > 2) {
    if (n % 2 == 0) {
      last -= step;
    }
    n = (n + 1) / 2;
    step++;
  }

  cout << a + b << ' ' << (long long) a * last + b << endl;

	return 0;
}