#include #include #include #include #include using namespace std; long long mypow(long long b, long long p) { long long r = 1; while(p) { if(p&1) { r *= b; r%=1000000007;} b *= b; b %= 1000000007; p >>= 1; } return r; } int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */ long long a,b,t; cin >> a >> b >> t; long long r = mypow((a+b)/2, t); cout << r << endl; return 0; }