#include #include using namespace std; __int128 mod = (__int128)(1000000007); __int128 power(__int128 x, unsigned long long y) { if( y == 0) return 1; else if (y%2 == 0) return ((power(x, y/2)*power(x, y/2))%(mod)); else return ((x*power(x, y/2)*power(x, y/2))%(mod)); } int main() { unsigned long long t,a,b; cin >> a >> b >> t; cout << (unsigned long long)power((__int128)(0.5*(a+b)), t); return 0; }