# Enter your code here. Read input from STDIN. Print output to STDOUT a,b,t = gets.chomp.split(' ') amount_a = a.to_i * 0.5 * t.to_i amount_b = b.to_i * 0.5 * t.to_i final = (amount_a + amount_b) % (10**9 + 7) puts final.floor