import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int a = scan.nextInt(); int b = scan.nextInt(); int t = scan.nextInt(); long modded = 1000000007; long result = (int) (((0.5 * a * t) + (0.5 * b * t)) % modded); System.out.println(result); } }