import sys a, b, t = [int(i) for i in input().strip().split(' ')] exp_num = 0.5 * t * (a + b) % (10**9 + 7) print (int(exp_num))