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