#include #include #include #include #include using namespace std; const int BASE = 1e9 + 7; int a, b; long long t, result; void readData() { cin >> a >> b >> t; } long long power_(int a, long long n) { if (n == 0) { return 1; } long long b = power_(a, n / 2); b = (b * b) % BASE; if (n % 2 == 1) { b = (b * a) % BASE; } return b; } void solve() { // result is (a+b)^t / 2^t long long x = power_(a + b, t); long long y = power_(2, t); result = (x * power_(y, BASE - 2)) % BASE; } void printResult() { cout << result << endl; } int main() { readData(); solve(); printResult(); return 0; }