#include #include #include #include #include using namespace std; int main() { int a,b,t; double res; cin>>a>>b>>t; res=(0.5*t)*(a+b); cout<<(int)res %(1000000007); return 0; }