# Enter your code here. Read input from STDIN. Print output to STDOUT a,b,t = map(int,raw_input().strip().split(' ')) v=.5 * a * t + .5 * b * t print int(v % (10**9+7))