//
//  main.c
//  Princess's Marriage
//
//  Created by x15071xx on 2016/06/13.
//  Copyright ?? 2016??´ AIT. All rights reserved.
//

#include <stdio.h>
#define NUM 10000
int main(int argc, const char * argv[]) {
    
    //???????????¨??¨?¨????
    //?\????????????°????????¨?????? * ???????????°??????????????°?????????
    //ok
    
    while (1) {
        
        int array[NUM][2]={0};//di pi
        int n=0,m=0;
        int i,j;
        int d=0,p=0;
        int sum_p=0;
        int p_max=-1,p_i = 0;

        scanf("%d %d",&n,&m);
        
        if (n==0&&m==0) {
            break;
        }
        
        for (i=0; i<n; i++) {
            scanf("%d %d",&d,&p);
            array[i][0] = d;
            array[i][1] = p;
            sum_p = sum_p + (d * p);
        }
        
        //??????????¨????
        
        while (m!=0 || sum_p==0) {
            for (i=0; i<n; i++) {
                if (p_max < array[i][1]) {
                    p_max=array[i][1];
                    p_i=i;
                }
            }
            
            array[p_i][1] = -1;
            
            if (m-array[p_i][0] <= 0) {
                sum_p = sum_p - (m * p_max);
                m = 0;
            } else {
                sum_p = sum_p - (array[p_i][0] * p_max);
                m = m - array[p_i][0];
            }
            
            p_max=-1;
        }
        
        printf("%d\n",sum_p);
        
    }
    return 0;
}