a = [int(a_temp) for a_temp in input().strip().split(' ')] t = 10 ** 9 + 7 num = 0.5 * a[0] * a[2] + 0.5 * a[1] * a[2] out_put = int(num % t) print (out_put)