#include #include #include #include #include #define ll long long using namespace std; ll modpow(ll base, ll exp, ll modulus) { base %= modulus; ll result = 1; while (exp > 0) { if (exp & 1) result = (result * base) % modulus; base = (base * base) % modulus; exp >>= 1; } return result; } ll pow(ll a, ll b, ll MOD) { ll x = 1, y = a; while(b > 0) { if(b%2 == 1) { x=(x*y); if(x>MOD) x%=MOD; } y = (y*y); if(y>MOD) y%=MOD; b /= 2; } return x; } int modInverse(int a, int m) { return pow(a,m-2,m); } int main() { long long a,b,t; cin>>a>>b>>t; cout<<(modpow(a+b,t,1000000007)*modInverse(modpow(2,t,1000000007),1000000007))%1000000007; return 0; }