#include using namespace std; const int mod = 1000000007; int main() { long long int a, b, t, sol = 1, pom; cin >> a >> b >> t; pom = (a + b ) / 2; while( t ) { if( t % 2 ) { sol = ( sol * pom ) % mod; } pom = ( pom * pom ) % mod; t /= 2; } cout << sol; return 0; }