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