program MayLava;
var
a,b:array[1..10001]of longint;
n,s:longint;
sum,store:int64;
procedure start;
var
f:text;
i:longint;
begin
assign(f,'factory.in');
reset(f);
readln(f,n,s);
for i:=1 to n do
readln(f,a[i],b[i]);
close(f);
sum:=0;
end;
procedure main;
var
i,j:longint;
begin
for i:=1 to n do begin
sum:=sum+store*s;
if store>=b[i] then store:=store-b[i]
else begin
sum:=sum+a[i]*b[i];
j:=1;
while a[i]+s*j<a[i+j] do begin
store:=store+b[i+j];
sum:=sum+a[i]*b[i+j];
inc(j);
end;
end;
end;
end;
procedure print;
var
f:text;
begin
assign(f,'factory.out');
rewrite(f);
writeln(f,sum);
close(f);
end;
BEGIN
start;
main;
print;
END.