#include #include #include #include #include using namespace std; typedef long long ULONG; ULONG power(ULONG a, ULONG b) { if (b == 0) return 1; ULONG temp = power(a, b/2); if ( (b % 2) == 0 ) return ((temp % 1000000007) * (temp % 1000000007)) % 1000000007; else return ((((a % 1000000007) * (temp % 1000000007)) % 1000000007) * temp) % 1000000007; } int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */ ULONG a, b; ULONG t; ULONG total = 0; cin >> a >> b >> t; //total = (int ( pow(0.5, t) * pow((a+b), t)) ) % 1000000007; total = power((a+b) * 0.5, t); cout << total; return 0; }