import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String S = sc.next(); String[] strings = S.split(","); int u = Integer.parseInt(strings[0]); int b = Integer.parseInt(strings[1]); int h = Integer.parseInt(strings[2]); double a = (double) ((u + b) * h) / 2; System.out.printf("%s", String.format("%.2f", a)); } }