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