/**
 * Main.cpp
 *
 *  Created on: 2018/12/02
 *      Author: EngineerChiyoko
 */
#include <set>
#include <map>
#include <list>
#include <queue>
#include <stack>
#include <cmath>
#include <ctime>
#include <cstdio>
#include <vector>
#include <stack>
#include <string>
#include <bitset>
#include <cctype>
#include <cstdlib>
#include <cstring>
#include <utility>
#include <numeric>
#include <complex>
#include <sstream>
#include <fstream>
#include <iomanip>
#include <cassert>
#include <iostream>
#include <iterator>
#include <algorithm>

#define rep(i, n) REP(i, 0, n)
#define REP(i, x, n) for(int i = x; i < (int)n; i++)
#define ALL(x) (x).begin(),(x).end()
#define SZ(x) ((int)(x).size())

using namespace std;

typedef long long 				lint;
typedef unsigned long 			ul;
typedef vector<int> 				vi;
typedef vector<vector<int>> 		vvi;
typedef pair<int, int> 			pii;
typedef vector< pair<int, int> > 	vpii;

const int MOD = 1000000007;
const double EPS = 1e-9;

struct callBeforeMainMethod{
	callBeforeMainMethod(){
		cin.tie(0);
		ios::sync_with_stdio(0);
		cout<<fixed<<setprecision(20);
	};
};

struct UnionFind {
    vector<int> par;

    UnionFind(int n) : par(n, -1) { }
    void init(int n) { par.assign(n, -1); }

    int root(int x) {
        if (par[x] < 0) return x;
        else return par[x] = root(par[x]);
    }

    bool issame(int x, int y) {
        return root(x) == root(y);
    }

    bool merge(int x, int y) {
        x = root(x); y = root(y);
        if (x == y){
        	return false;
        }
//        if (par[x] > par[y]){
//        	swap(x, y); // merge technique
//        }
        par[x] += par[y];
        par[y] = x;
        return true;
    }

    int size(int x) {
        return -par[root(x)];
    }
};

//int qp(int a,lint b){int ans=1;do{if(b&1)ans=1ll*ans*a%mo;a=1ll*a*a%mo;}while(b>>=1);return ans;}
//int qp(int a,lint b,int mo){int ans=1;do{if(b&1)ans=1ll*ans*a%mo;a=1ll*a*a%mo;}while(b>>=1);return ans;}

int gcd(int a,int b){
	return b ? gcd(b, a % b) : a;
}

void precalc() {

    /*for (int i = 2; i < C; ++i) {
       if (!least_prime[i]) {
           least_prime[i] = i;
           for (li j = i * 1LL * i; j < C; j += i) {
               least_prime[j] = i;
           }
       }
   }*/

    /*fact[0] = revfact[0] = 1;
   for (int i = 1; i < 100500; ++i) {
   fact[i] = fact[i - 1] * i % curMod;
   revfact[i] = binpow(fact[i], curMod - 2, curMod);
   }*/

    /*for (int w = 0; w < 2; ++w) {
   powers[w][0] = 1;
   for (int j = 1; j < C; ++j) {
   powers[w][j] = (powers[w][j - 1] * 1LL * pr[w]) % mods[w];
   }
   }*/

    /*catalan[0] = 1;
   for (int n = 0; n < 200500 - 1; ++n) {
   catalan[n + 1] = catalan[n] * 2 * (2 * n + 1) % MOD * binpow(n + 2, MOD - 2, MOD) % MOD;
   }*/

    /*for (int i = 0; i < 5010; ++i) {
   c[i][i] = c[i][0] = 1;
   for (int j = 1; j < i; ++j) {
   c[i][j] = (c[i - 1][j - 1] + c[i - 1][j]) % MOD;
   }
   }*/

    /*for (int i = 0; i < 100; ++i) {
   doubleC[i][i] = doubleC[i][0] = 1.0;
   for (int j = 1; j < i; ++j) {
   doubleC[i][j] = doubleC[i - 1][j - 1] + doubleC[i - 1][j];
   }
   }*/
}
bool compare_no2(const pii& left, const pii& right)
{
  return left.first < right.first ;
}


int main (){
//	int dx[4]={1,0,-1,0};
//	int dy[4]={0,1,0,-1};
	int N=0;
	int M=0;

	scanf("%d", &N);
	scanf("%d", &M);

//	  printf("%d\n", N);
//	  printf("%d\n", M);


	vpii vp;

	REP(i, 0, N){
		int tmpA, tmpB;
//
//		  printf("tmpA =%d\n", tmpA);
//		  printf("tmpB = %d\n", tmpB);

		scanf("%d", &tmpA);
		scanf("%d", &tmpB);

		vp.push_back(make_pair(tmpA, tmpB));
	}

	std::sort(vp.begin(),vp.end(),compare_no2);//比較関数を指定してソート

//	std::sort(vp.begin(),vp.end(),compare_no2);//比較関数を指定してソート

	int nokoriHonsu = M;
	lint kingaku = 0;
	REP(i, 0, N){
		pii p = vp[i];
//
//		  printf("nokori = %d\n", nokoriHonsu);
//		  printf("first = %d\n", p.first);
//		  printf("second = %d\n", p.second);
		if(p.second < nokoriHonsu){
			kingaku += (lint)p.first * (lint)p.second;
			nokoriHonsu -= p.second;
			continue;
		}else{
			kingaku += (lint)p.first * (lint)nokoriHonsu;
			break;
		}
	}



	/* ここから出力処理 */
	cout << kingaku << endl;
	return 0;
}


Measured memory_bytes: 1400