import java.io.*; import java.util.*; public class Solution { static Scanner in; public static void main(String[] args) { in=new Scanner(System.in); int a= in.nextInt(); int b= in.nextInt(); int t = in.nextInt();//time in millisecs int ans= 0; for(int m=0; m< t; m++) { ans+= .5* (a+b); } System.out.println (ans%1000000007); } }