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