#include #include #include #include int main() { int a,b,c; long int t,p; scanf("%d%d%ld",&a,&b,&t); p=((a+b)*t)/2; if(p<(pow(10,9)+7)) p=p; else{ c=p/(pow(10,9)+7); p=p-c*(pow(10,9)+7); } printf("%ld",p); /* Enter your code here. Read input from STDIN. Print output to STDOUT */ return 0; }