#include #include #include #include long long int power(long long int a,long long int b) { long long int ans=1; while(b) { if(b&1) ans=(ans*a)%1000000007; a=(a*a)%1000000007; b=b/2; } return ans; } int main() { int a,b; scanf("%d""%d",&a,&b); long long int t,i,q=1; scanf("%lld",&t); long long int p=0.5*(a+b); printf("%lld",power(p,t)); /* Enter your code here. Read input from STDIN. Print output to STDOUT */ return 0; }