#include #include #include #include #include using namespace std; #define mod 1000000007 #define ll long long ll p(ll a,ll b) { if(b==0) return 1; ll temp; temp=p(a,b/2)%mod; if(b&1) { return (((a*temp)%mod)*temp)%mod; } else return (((temp)%mod)*temp)%mod; } int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */ int a,b; ll t; scanf("%d %d %lld",&a,&b,&t); ll ans=p((((a+b)*0.5)),t)%mod; printf("%lld\n",ans); return 0; }