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 inp=new Scanner(System.in); int a,b; long t,res; a=inp.nextInt(); b=inp.nextInt(); t=inp.nextLong(); res=(long)((((a+b)*t)/2))%(1000000007); System.out.println(res); inp.close(); } }