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