#include #include #include #include #include using namespace std; unsigned long long int power(unsigned long long int x,unsigned long long int y,unsigned long long int p) { unsigned long long int res = 1; x = x % p; while (y > 0){ if (y & 1) res = (res*x) % p; y = y>>1; x = (x*x) % p; } return res; } int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */ unsigned long long int a,b,t,count=1; unsigned long long int sum=0; cin>>a>>b>>t; sum=(0.5*a*1)+(0.5*b*1); sum=power(sum,t,1000000007); cout<