# Enter your code here. Read input from STDIN. Print output to STDOUT n=map(int,raw_input().split()) p=(0.5*n[0]*n[2]) + (0.5*n[1]*n[2]) print int(p%((10**6)+7))