#include #include #define base 1000000007 typedef long long ll; using namespace std; ll p(int n,ll m) { if (m==0) return 1LL; ll tmp=p(n,m/2); tmp=(tmp*tmp)%base; if (m%2==1) return (tmp*n)%base; return tmp; } int main() { int a,b; ll t; cin>>a>>b>>t; ll res=p((b+a)/2,t); cout<