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