# Enter your code here. Read input from STDIN. Print output to STDOUT input = STDIN.readline.split(" ").map(&:to_i) a, b, t = input e_value = 0.5 * t * (a + b) e_value = e_value % (10**2 + 7) p e_value.to_i