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 in = new Scanner(System.in); double growthRate1 = in.nextInt(); double growthRate2 = in.nextInt(); double milliSeconds = in.nextInt(); final double probability = 0.5; double returnValue = ((growthRate1+growthRate2)*probability*milliSeconds)%(Math.pow(10, 9) + 7); int castValue = (int) Math.round(returnValue); System.out.print(castValue); } }