#include #include #include #include #include using namespace std; int power(int x, unsigned int y, int p) { int res = 1; x = x % p; while (y > 0) { if (y & 1) res = (res*x) % p; y = y>>1; x = (x*x) % p; } return res; } int main() { int a, b, t; cin >> a >> b >> t; cout << power(0.5*(a+b), t, 1000000007); return 0; }