#include #include #include #include #include using namespace std; /* Function to calculate x raised to the power y */ /*int power(int x, unsigned int y) { if( y == 0) return 1; else if (y%2 == 0) return power(x, y/2)*power(x, y/2); else return x*power(x, y/2)*power(x, y/2); } */ unsigned long long mypower(unsigned long long x, unsigned long long y){ if (y == 0) return 1; unsigned long long temp = mypower(x, y/2); if (y%2 == 0) return (temp%1000000007*temp%1000000007); else return (x*temp%1000000007*temp%1000000007); } long virus1 = 1.0, virus2= 1.0, dev=1.0e9+7.0; int main() { unsigned long long a,b,t,k; cin >> a >> b >> t; k=((a*0.5)+(b*0.5)); //int answ=mypower(k,t); cout << mypower(k,t); return 0; }