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