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 in = new Scanner(System.in); int a = in.nextInt(); int b = in.nextInt(); int t = in.nextInt(); double pop = ((double)a + (double)b) / 2d; pop = (pop * (double)t) % (1000000007); System.out.println((int)pop); } }