import java.io.*; import java.util.*; public class Solution { public static void main(String[] args) { int t,a,b,i,op; int ip[]=new int[3]; double m=Math.pow(10,9)+7; Scanner sc=new Scanner(System.in); for(i=0;i<3;i++) { ip[i]=sc.nextInt(); } a=ip[0]; b=ip[1]; t=ip[2]; op=(int)(0.5*t*(a+b)); op%=m; System.out.println(op); } }