#include <stdio.h>
#define P_MAX 100

int main(void)
{
    int length[P_MAX + 1], n, m, d, p, sum;

    while(scanf("%d %d", &n, &m), n + m)
    {
        for(p = 0; p <= P_MAX; p++)
            length[p] = 0;

        while(n--)
        {
            scanf("%d %d", &d, &p);
            length[p] += d;
        }

        for(p = P_MAX; p >= 0 && m > 0; p--)
            if(length[p] <= m) m -= length[p], length[p] = 0;
            else length[p] -= m, m = 0;

        for(sum = p = 0; p <= P_MAX; p++)
            sum += p * length[p];

        printf("%d\n", sum);
    }

    return 0;
}