#include <iostream>
using namespace std;
int main(){
	int a;
	int b;
	int h;
	int s =(a+b)*h/2;
	cout<<s<<endl;
	cout << fixed << setprecision(1)<<s<<endl;
	
}
