{
TASK:stairs
LANG:pascal
}
{$S-}
type characteristics=Record
       h,w:Real;
     End;
var n,k,i,j,needed,br:Longint;
    stair,original:Array[1..100]of characteristics;
    hsum,wi,hi,final,temp:Real;
procedure rise(op:Byte);
var i:Byte;
Begin
 if ((op=0)and(br<>needed))or(temp>final) then Exit;
 if br=needed then
 Begin
  if (temp<final)and(temp>0) then final:=temp;
   Exit;
 End;
 For i:=op-1 downto 0 do
 Begin
   br:=br+1;
   stair[i].h:=stair[i+1].h;
   temp:=temp+(stair[i].h-original[i].h)*stair[i].w;
   rise(i);
   temp:=temp-(stair[i].h-original[i].h)*stair[i].w;
   stair[i].h:=original[i].h;
   br:=br-1;
   rise(i);
 End;
End;
Begin
  final:=10000000;
  ReadLn(n,k);
 For i:=1 to n do
 Begin
   readLn(hi,wi);
   hsum:=hsum+hi;
   stair[i].w:=wi;
   stair[i].h:=hsum;
 End;
  original:=stair;
  needed:=n-k;
  rise(n);
  WriteLn(final:0:3);
End.
