#include #include #include #include int main() { int a,b; long int t,r,r1; scanf("%d%d%ld",&a,&b,&t); r= a*0.5*t+b*0.5*t; r1=r%1000000007; printf("%ld",r1); return 0; }