import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; 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. */ int a,b,c; double t,sum=0.0,ans=0.0; Scanner scan =new Scanner(System.in); a=scan.nextInt(); b=scan.nextInt(); t=scan.nextLong(); sum=0.5*t*(a+b); ans=sum%(Math.pow(10.0,9.0)+7); c=(int) ans; System.out.println(c); scan.close(); } }