a,b,c = map(int,input().split(",")) if (c==0): print("0.00") else: print("{:.2f}".format((a+b)/2*c))