#include using namespace std; int i; long long a, b, n; int main() { ios_base::sync_with_stdio(0); cin >> a >> b >> n; cout << a + b << ' '; long long x = 0; while(n > 2) ++x, n /= 2; cout << a * (1 << x) + b + a << '\n'; return 0; }