import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { private static final double PROBABILITY = 0.5; public static void main(String[] args) { Scanner in = new Scanner(System.in); int a = in.nextInt(); int b = in.nextInt(); long t = in.nextLong(); long results = 0; if(isValidInt(a) && isValidInt(b) && isValidLong(t)) { for(long i = 1; i <= t; i++) { long buffer = ((long) ((PROBABILITY * a * i) + (PROBABILITY * b * i))); results += buffer % (Math.pow(10, 9) + 7); } } System.out.println(results); } private static boolean isValidInt(int i) { return i >= 1 && 1 <= 100; } private static boolean isValidLong(long i) { return i >= 1 && 1 <= ((long) Math.pow(10, 18)); } }