function processData(input) { var [a, b, t] = input.split(' ').map(Number); var p = ((0.5 * a * t) + (0.5 * b * t)) % (Math.pow(10, 9) + 7); console.log(p); } process.stdin.resume(); process.stdin.setEncoding("ascii"); _input = ""; process.stdin.on("data", function (input) { _input += input; }); process.stdin.on("end", function () { processData(_input); });