/*
TASK:stairs
LANG:C++
*/

#include<iostream>
#include<stdio.h>
using namespace std;

class stair
{
public:
       int used;
       stair(): used(0) {};
       double height;
       double weight;
       double how_much_gold(stair&);
       void obed(stair&);
};

double stair::how_much_gold(stair& next)
       {                          
             return weight*next.height;
       }

void stair::obed(stair& next)
       {
             used=1;
             next.weight+=weight;
             next.height+=height;
       }           

stair stairs[100];
int n;
int k;

int main(void)
{
    cin >> n;
    cin >> k;
    for(int i=0; i<n; i++)
    {
            cin >> stairs[i].height;
            cin >> stairs[i].weight;
    }
    double little=0;
    int who=0;
    double answer=0;
    for(int i=k; i<n; i++)
    {   
       for(int j=0; j<n-1;j++)
       {
           if(stairs[j].used==0)
           {
               if(little>stairs[j].how_much_gold(stairs[j+1])||little==0)
               {
                     little=stairs[j].how_much_gold(stairs[j+1]);
                     who=j;
               }
           }
       }
       answer+=little;
       stairs[who].obed(stairs[who+1]);
    }
    printf("%0.3lf",answer);
}
              
