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 input = new Scanner(System.in); int [] inp = new int[3]; double output = 0; for (int i = 0;i<3;i++) inp[i]= input.nextInt(); output = ((inp[0]+inp[1])*0.5*inp[2])%(Math.pow(10,9)+7); System.out.println((int)output); } }