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