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(); int result = (a*t)/2 + (b*t)/2; BigInteger big = new BigInteger("1000000007"); BigInteger res = new BigInteger(String.valueOf(result)); res = res.mod(big); System.out.println(res); } }