#include <bits/stdc++.h>

using namespace std;

int a, b, n;

int main()
{
#ifndef ONLINE_JUDGE
	freopen("data.in", "r", stdin);
	freopen("data.out", "w", stdout);
#endif // ONLINE_JUDGE

	ios::sync_with_stdio(0);
	cin >> a >> b >> n;

	if (n == 2)
	{	cout << a << ' ' << a * 2 + b;
		return 0;
	}

	unsigned long long i = log2(n - 1);
	i = (1ULL << i) + 1;
	cout << a + b << ' ' << 1ULL * a * i + b;
}