#include #include #include #include unsigned long mypow(unsigned long x, unsigned long exp) { int temp; if( exp == 0) return 1; temp = mypow(x, exp/2); if (exp%2 == 0) return temp*temp; else return x*temp*temp; } int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */ unsigned long a,b,t; scanf("%ld",&a); scanf("%ld",&b); scanf("%ld",&t); printf ("%ld",mypow(0.5*(a+b), t)%(1000000007)); return 0; }