#include int main(void){ int u,b,h,a,A; scanf("%d,%d,%d\n",&u,&b,&h); a = (u + b)*h; A = a/2; printf("%.2f\n",(double)A); return 0; }