#include <bits/stdc++.h>
using namespace std;
using uint = unsigned int;
using ll = long long;
using pii = pair<int, int>;
#define dbg(x) cerr<<#x": "<<(x)<<'\n'
#define dbg_v(x, n) cerr<<#x"[]: ";for(long long _=0;_<n;++_)cerr<<(x)[_]<<' ';cerr<<'\n'
#define all(v) v.begin(), v.end()
#define NMAX 

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

	int n, nn, a, b, p1, p2, bit;

	cin >> a >> b >> n;

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

	for(nn = n, bit = 0; nn > 2; ++bit)
	{
		// n >> bit numere 
		nn -= nn / 2;
	}

	p1 = (n & (1 << bit)) ? (n - (1 << bit)) : n;
	p2 = p1 + (1 << bit);

	

	cout << 1LL * a * p1 + b << ' ' << 1LL * a * p2 + b << '\n';

	return 0;
}