#include <stdio.h>
int main(void)
{
    int n;
    long long int m;
    int d[10005]={};
    int p[10005]={};
    int dd[10005]={};
    int pp[10005]={};
    int point=0;
    int count=0;
    int keepd,keepp,keepx;
    while(1==1)
    {
        point=0;
        count=0;
        scanf("%d %lld\n",&n,&m);
        if(n==0&&m==0)break;
        for(int q=0;q<n;q++)scanf("%d %d\n",&d[q],&p[q]);
        while(count<n)
        {
            keepp=0;
            for(int x=0;x<n;x++)
            {
                if(keepp<p[x])
                {
                    keepp=p[x];
                    keepd=d[x];
                    keepx=x;
                }
            }
            dd[point]=keepd;
            pp[point]=keepp;
            point++;
            p[keepx]=0;
            count++;
        }
        point=0;
        while(m>0 && point<n)
        {
            if(m>dd[point])
            {
                m-=dd[point];
                dd[point]=0;
                point++;
            }
            else
            {
                dd[point]-=m;
                m=0;
            }
        }
        long long int ans=0;
        for(int y=0;y<n;y++)
        {
            ans+=dd[y]*pp[y];
        }
        //for(int z=0;z<n;z++)printf("##%d %d##\n",dd[z],pp[z]);
        printf("%lld\n",ans);
    }
    return 0;
}

