s = input() a,b,t = map(int,s.split()) gf = t/2 res = (gf*(a+b))%(10e9 + 7) print(int(res))