import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { int sum=0; int rep(int i,int j,int k) { sum=(int)(0.5*i*k+0.5*j*k); return sum; } public static void main(String[] args) { Scanner sc=new Scanner(System.in); int time,a,b; a=sc.nextInt(); b=sc.nextInt(); time=sc.nextInt(); /* Enter your code h ere. Read input from STDIN. Print output to STDOUT. Your class should be named Solution. */ Solution s=new Solution(); int l=s.rep(a,b,time); int k=(int)(l%(Math.pow(10,9)+7)); System.out.print(k); } }