u, b, h = map(int, input().split(",")) menseki = (u + b) * h / 2 print("{:.02f}".format(menseki))