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