def main(): a, b, t = [int(i) for i in raw_input().split(' ')] print int(0.5 * (a + b) * t % (10 ** 9 + 7)) main()