import java.io.*; import java.util.*; import java.lang.*; public class Solution { public static void main(String[] args) { /* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution. */ long m=(long)Math.pow(10,9)+7; Scanner s = new Scanner(System.in); long a,b,t; a=s.nextLong(); b=s.nextLong(); t=s.nextLong(); long expect = (long)(((0.5*t)*(a+b))%m); System.out.println(expect); } }