#include using namespace std; /* Iterative Function to calculate (x^n)%p in O(logy) */ int power(long long int x, unsigned long long int y, long long int p) { int res = 1; // Initialize result x = x % p; // Update x if it is more than or // equal to p while (y > 0) { // If y is odd, multiply x with result if (y & 1) res = (res*x) % p; // y must be even now y = y>>1; // y = y/2 x = (x*x) % p; } return res; } int main(){ long long int a,b,t; cin>>a>>b>>t; long long int x=(a+b)/2; long long int ans=power(x,t,1000000000+7); cout<