#include using namespace std; int main(void){ int u,b,h; char t; cin >> u >> t >> b >> t >> h; cout << fixed << setprecision(2) << (double)((u+b)*h)/2.0 << endl; }