#include #include #include #include #include using namespace std; int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */ int a, b, t; cin >> a >> b >> t; long double result=(int)((0.5*t)*(a+b))%(1000000000+7); cout << result; return 0; }