program EmberAsh;
var
i,j,k,n,m,s,t:longint;
a,b:array[0..10000] of longint;
min:qword;
fin,fout:text;
BEGIN
assign(fin,'factory.in');reset(fin);
assign(fout,'factory.out');rewrite(fout);
readln(fin,n,s);
readln(fin,a[1],b[1]);
min:=a[1]*b[1];
for i:=2 to n do
begin
readln(fin,a[i],b[i]);
if a[i]>a[i-1]+s then
a[i]:=a[i-1]+s;
min:=min+a[i]*b[i];
end;
writeln(fout,min);
close(fin);close(fout);
END.