a, b, c = map(int, input().split(",")) print(format((a + b) / 2 * c, ".2f"))