# Enter your code here. Read input from STDIN. Print output to STDOUT a,b,t = map(int, raw_input().strip().split(" ")) print(int(0.5*t*(a+b)) % 1000000007)