#include #include #include #include #include using namespace std; long long fast_pow(long long int a,long long int n) { long long result = 1; long long power = n; long long value = a; while(power>0) { if(power&1) {result = result*value; result = result%1000000007;} value = value*value; value = value%1000000007; power /= 2; //power >>= 1; } return result; } int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */ unsigned long long int a, b, c, d, x, y; cin >> b; cin >> c; cin >> a; d = (b + c)/2; x = fast_pow(d,a); y = x % (fast_pow(10,9) + 7); cout << x; return 0; }