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