n,m=map(int,input().split())
ab=sorted([list(map(int,input().split())) for _ in range(n)])
ans=0
i=0
while i<n:
    if m>=ab[i][1]:
        ans+=(ab[i][0])*ab[i][1]
        m-=ab[i][1]
        i+=1
    else:
        ans+=(ab[i][0])*(m)
        break
print(ans) 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 ab=sorted([list(map(int,input().split())) for _ in range(n)]) ab sorted([list(map(int,input().split())) for _ in range(n)]) sorted [list(map(int,input().split())) for _ in range(n)] ans=0 ans 0 i=0 i 0 while i<n:
    if m>=ab[i][1]:
        ans+=(ab[i][0])*ab[i][1]
        m-=ab[i][1]
        i+=1
    else:
        ans+=(ab[i][0])*(m)
        break i<n i n if m>=ab[i][1]:
        ans+=(ab[i][0])*ab[i][1]
        m-=ab[i][1]
        i+=1
    else:
        ans+=(ab[i][0])*(m)
        break m>=ab[i][1] m ab[i][1] [i] ab i 1 ans+=(ab[i][0])*ab[i][1] ans (ab[i][0])*ab[i][1] ab[i][0] [i] ab i 0 ab[i][1] [i] ab i 1 m-=ab[i][1] m ab[i][1] [i] ab i 1 i+=1 i 1 ans+=(ab[i][0])*(m) ans (ab[i][0])*(m) ab[i][0] [i] ab i 0 m break print(ans) print ans n,m=map(int,input().split()) map(int,input().split()) n i=0 0 i ans+=(ab[i][0])*ab[i][1] (ab[i][0])*ab[i][1] ans i+=1 1 i ans=0 0 ans ans+=(ab[i][0])*(m) (ab[i][0])*(m) ans ab=sorted([list(map(int,input().split())) for _ in range(n)]) sorted([list(map(int,input().split())) for _ in range(n)]) ab m=map(int,input().split()) map(int,input().split()) m m-=ab[i][1] ab[i][1] m
n,m=map(int,input().split())
ab=sorted([list(map(int,input().split())) for _ in range(n)])
ans=0
i=0
while i<n:
    if m>=ab[i][1]:
        ans+=(ab[i][0])*ab[i][1]
        m-=ab[i][1]
        i+=1
    else:
        ans+=(ab[i][0])*(m)
        break
print(ans)