// C - Energy Drink Collector
#include <bits/stdc++.h>
using namespace std;
using ll = long long;

int main(){
	int N,M; cin>>N>>M;

	map<int,ll> AB;
	for(int i=0; i<N; ++i){
		int a,b; cin>>a>>b;
		AB[a] += b;
	}

	ll yen = 0;
	for(auto e:AB){
		ll c = min((ll)M, e.second);
		yen += c * e.first;
		if((M-=c)<=0) break;
	}
	cout<< yen <<endl;
}