n,m=map(int,input().split())

a=sorted([list(map(int,input().split())) for _ in range(n)])

#print(a)
pay=0
i=0
while m>0:
    p=min(m,a[i][1])
    m-=p
    pay+=p*a[i][0]
    i+=1
print(pay)

 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 _ in range(n) for _ in range(n) _ range(n) range n for _ in range(n) list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split a=sorted([list(map(int,input().split())) for _ in range(n)]) a sorted([list(map(int,input().split())) for _ in range(n)]) sorted [list(map(int,input().split())) for _ in range(n)] pay=0 pay 0 i=0 i 0 while m>0:
    p=min(m,a[i][1])
    m-=p
    pay+=p*a[i][0]
    i+=1 m>0 m 0 p=min(m,a[i][1]) p min(m,a[i][1]) min m a[i][1] [i] a i 1 m-=p m p pay+=p*a[i][0] pay p*a[i][0] p a[i][0] [i] a i 0 i+=1 i 1 print(pay) print pay m=map(int,input().split()) map(int,input().split()) m i+=1 1 i n,m=map(int,input().split()) map(int,input().split()) n i=0 0 i p=min(m,a[i][1]) min(m,a[i][1]) p pay=0 0 pay a=sorted([list(map(int,input().split())) for _ in range(n)]) sorted([list(map(int,input().split())) for _ in range(n)]) a m-=p p m pay+=p*a[i][0] p*a[i][0] pay
n,m=map(int,input().split())

a=sorted([list(map(int,input().split())) for _ in range(n)])

#print(a)
pay=0
i=0
while m>0:
    p=min(m,a[i][1])
    m-=p
    pay+=p*a[i][0]
    i+=1
print(pay)


