n,m = map(int,input().split())
ab = sorted([list(map(int,input().split())) for i in range(n)])
shop,cost,rest=0,0,m
while True:
    if ab[shop][1]<rest:
        cost += ab[shop][1]*ab[shop][0]
        rest -= ab[shop][1]
        shop+=1
    else:
        cost+=ab[shop][0]*rest
        break
print(cost) n,m = map(int,input().split()) n map(int,input().split()) map int input().split() ().split () input split m list(map(int,input().split())) for i in range(n) for i in range(n) i range(n) range n for i in range(n) list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split ab = sorted([list(map(int,input().split())) for i in range(n)]) ab sorted([list(map(int,input().split())) for i in range(n)]) sorted [list(map(int,input().split())) for i in range(n)] shop,cost,rest=0,0,m shop 0 cost 0 rest m while True:
    if ab[shop][1]<rest:
        cost += ab[shop][1]*ab[shop][0]
        rest -= ab[shop][1]
        shop+=1
    else:
        cost+=ab[shop][0]*rest
        break True if ab[shop][1]<rest:
        cost += ab[shop][1]*ab[shop][0]
        rest -= ab[shop][1]
        shop+=1
    else:
        cost+=ab[shop][0]*rest
        break ab[shop][1]<rest ab[shop][1] [shop] ab shop 1 rest cost += ab[shop][1]*ab[shop][0] cost ab[shop][1]*ab[shop][0] ab[shop][1] [shop] ab shop 1 ab[shop][0] [shop] ab shop 0 rest -= ab[shop][1] rest ab[shop][1] [shop] ab shop 1 shop+=1 shop 1 cost+=ab[shop][0]*rest cost ab[shop][0]*rest ab[shop][0] [shop] ab shop 0 rest break print(cost) print cost cost += ab[shop][1]*ab[shop][0] ab[shop][1]*ab[shop][0] cost cost+=ab[shop][0]*rest ab[shop][0]*rest cost shop,cost,rest=0,0,m 0 shop m = map(int,input().split()) map(int,input().split()) m shop+=1 1 shop ab = sorted([list(map(int,input().split())) for i in range(n)]) sorted([list(map(int,input().split())) for i in range(n)]) ab cost,rest=0,0,m 0 cost rest=0,0,m m rest rest -= ab[shop][1] ab[shop][1] rest n,m = map(int,input().split()) map(int,input().split()) n
n,m = map(int,input().split())
ab = sorted([list(map(int,input().split())) for i in range(n)])
shop,cost,rest=0,0,m
while True:
    if ab[shop][1]<rest:
        cost += ab[shop][1]*ab[shop][0]
        rest -= ab[shop][1]
        shop+=1
    else:
        cost+=ab[shop][0]*rest
        break
print(cost)