#include #include #include #include #include using namespace std; const int size=1000000007; long long int power(int x, unsigned long long int y) { if( y == 0) return 1; else if (y%2 == 0) return ((power(x, y/2)%size)*(power(x, y/2)%size))%size; else return ((x*power(x, y/2)%size)*(power(x, y/2)%size))%size; } int main() { int a; int b; unsigned long long int t; cin >> a; cin >> b; cin >> t; int x = (a+b)/2 ; long long int n = power(x,t); cout << n; /* Enter your code here. Read input from STDIN. Print output to STDOUT */ return 0; }