#include <iostream>
#include <algorithm>

using namespace std;

int main()
{
	int one, many, all, heikin, i;
	
	all = 0;
	
	i = 0;
	
	while(cin >> one >> many){
	
		all += one * many;
		
		heikin += many;
		
		i++;
	
	}
	cout << all << heikin / i << endl;
	
    return 0;
}