#include #include #include #include #include #include using namespace std; int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */ unsigned int a,b; unsigned long long t; cin>>a>>b>>t; int m = pow(10,9)+7; //(0.5*a+0.5*b); unsigned long long int virus = static_cast( pow((double(0.5*a+0.5*b)),t)) % m; cout<< virus ; return 0; }