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