#include #include using namespace std; #define MOD 1000000007 long long int power (long long int a, long long int b) { long long int ans=1ll; while(b) { if(b&1)ans=(ans*a)%MOD; a=(a*a)%MOD; b=b/2; } return ans; } int main() { int a,b; unsigned long long int t; cin >> a >> b >> t; unsigned long long int ans = (0.5*(a+b)); cout << power(ans, t) << endl; }