#include using namespace std; // Optimization stuff inline void debugMode() { #ifndef ONLINE_JUDGE freopen("debug.in", "r", stdin); #endif // ONLINE_JUDGE } inline void optimizeIt() { ios::sync_with_stdio(false); cin.tie(NULL); } // End optimization stuff inline double ABS(const int &x) { return max(x, -x); } inline bool isPrime(const int &x) { if(x == 1) return false; for(int d = 2; d * d <= x; d++) { if(x % d == 0) return false; } return true; } inline int GCD(int a, int b) { while(b) { int r = a % b; a = b; b = r; } return a; } typedef long long int ll; typedef long double ld; const int NMax = 2e3 + 5; const int LIM = 1e3; const int MOD = 666013; int main(){ debugMode(); optimizeIt(); int a, b, n; cin >> a >> b >> n; cout << a + b << " "; int i = 0; for(i = 0; (1 << i) < n; i++); cout << 1LL * a * ((1LL << (i - 1)) + 1) + b; return 0; }