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,t,n,n1; Scanner scan=new Scanner(System.in); a=scan.nextInt(); b=scan.nextInt(); t=scan.nextInt(); n=((a*t)+(b*t))/2; n1=n%(1000000007); System.out.print(n1); } }