import std.stdio,std.conv, std.algorithm, std.container,std.array,std.range,std.string,std.typecons;
const dx = [1,0,-1,0];
const dy = [0,1,0,-1];
void read(T...)(auto ref T args){ 
	auto line = readln().split(); 
	if (line.length < args.length) return;
	foreach(i,ref arg; args) arg = line[i].to!(typeof(arg));
}
struct Info{int dist,cost;}
void main(){	
	int n,m;
	while(read(n,m),n|m){
		Info[] infos;
		foreach(_;n.iota){
			int d,c;read(d,c);
			infos ~= Info(d,c); 
		}
		infos.sort!("a.cost > b.cost");
		int sum = reduce!("a + b.dist * b.cost")(0,infos);
		foreach(info;infos){
			if (m <= 0 ) break;
			int use_m = min(m,info.dist);
			m -= use_m;
			sum -= use_m * info.cost;
		}
		sum.writeln;
	}
}