import java.io.*; import java.util.*; public class Solution { public static void main(String[] args) { /* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution. */ Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); long t = sc.nextLong(); long modulo = (long) (Math.pow(10, 9) + 7); long result = (long) ((0.5 * t * (a + b)) % modulo); System.out.println(result); sc.close(); } }