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) throws Exception { /* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution. */ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String val[]= br.readLine().split(" "); final float half = 0.5f; final byte A = Byte.parseByte(val[0]); final byte B = Byte.parseByte(val[1]); long dur = Long.parseLong(val[2]); double cal = 0; cal = (half * A *dur ) + (half * B * dur); dur = (long) cal % (1000000000 + 7 ); System.out.print(dur); } }