#include #include #include #include #include using namespace std; #define m 1000000007; unsigned long long power(unsigned long long x,unsigned long long y) { unsigned long long res = 1; // Initialize result while (y > 0) { // If y is odd, multiply x with result if (y & 1) res = (res*x)%m; // n must be even now y = y>>1; // y = y/2 x = (x*x)%m; // Change x to x^2 } return res; } int main() { unsigned long long a,b; unsigned long long int t,ans; cin>>a>>b>>t; int c=(a+b)/2; ans=power(c,t); cout<<(ans)<