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) { Scanner s = new Scanner(System.in); int a = s.nextInt(); int b = s.nextInt(); long t = s.nextLong(); long part1 = (a * t); part1 /= 2; long part2 = (b * t); part2 /= 2; long result = part1 + part2; result = result % 1000000007; System.out.println(result); } }