program elysian;
const
fin='factory.in';fout='factory.out';
var
n,s:longint;
a,b:array[0..10000] of longint;
f1,f2:text;
procedure init;
var
min:int64;
i:longint;
begin
assign(f1,fin);reset(f1);
assign(f2,fout);rewrite(f2);
readln(f1,n,s);readln(f1,a[1],b[1]);
min:=a[1]*b[1];
for i:=2 to n do
begin
readln(f1,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;
close(f1);
writeln(f2,min);
close(f2);
end;
begin
init;
end.