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