# 台形の面積 def main(): u,b,h = map(int, input().split(",")) A = (u+b)*h / 2 print(f"{A: .2f}") if __name__ == "__main__": main()