# Enter your code here. Read input from STDIN. Print output to STDOUT n = map(int,raw_input().strip(" ").split()) print int((0.5*n[2]*(n[0]+n[1]))%(10^9+7))