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