import java.io.*; import java.util.*; 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. */ Scanner s=new Scanner(System.in); int a[]=new int[3]; double sum=0; for(int i=0;i<3;i++) a[i]=s.nextInt(); for(int i=1;i<=a[2];i++) sum=sum+(0.5*a[0]*i)+(0.5*a[1]*i); // System.out.println(sum); sum=sum% (java.lang.Math.pow(10,9)+7); System.out.println((int)sum); } }