#include #include #include #include #define M 1000000007 int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */ int a,b; long long int t,result; scanf("%d %d %lld",&a,&b,&t); result=(t%M)*0.5*(t%M)*(a+b); printf("%lld\n",result); return 0; }