#include 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; int i = log2(n-1); cout << a + b << ' ' << 1LL*a * (2*i+1) + b; }