#include #include #include #include #include using namespace std; unsigned long long power ( unsigned long long x, unsigned long long y, int p = 1000000007 ) { unsigned long long result = 1; x %= p; while ( y > 0 ) { if ( y & 1 ) result = (result*x) % p; y = y >> 1; x = (x*x) % p; } return result; } int main() { unsigned long t; int a, b; unsigned long long sum = 1; cin >> a >> b >> t; sum = power( 0.5*(a+b), t ); cout << sum << endl; return 0; }