N,M = map(int,input().split())
AB =[list(map(int,input().split())) for i in range(N)]

AB = sorted(AB)
total=0
for i in range(N):
    if AB[i][1]>M:
        total = total + AB[i][0]*M
        break
    else:
        total = total + AB[i][0]*AB[i][1]
        M = M - AB[i][1]

print(total) 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 =[list(map(int,input().split())) for i in range(N)] AB [list(map(int,input().split())) for i in range(N)] AB = sorted(AB) AB sorted(AB) sorted AB total=0 total 0 for i in range(N):
    if AB[i][1]>M:
        total = total + AB[i][0]*M
        break
    else:
        total = total + AB[i][0]*AB[i][1]
        M = M - AB[i][1] i range(N) range N if AB[i][1]>M:
        total = total + AB[i][0]*M
        break
    else:
        total = total + AB[i][0]*AB[i][1]
        M = M - AB[i][1] AB[i][1]>M AB[i][1] [i] AB i 1 M total = total + AB[i][0]*M total total + AB[i][0]*M total AB[i][0]*M AB[i][0] [i] AB i 0 M break total = total + AB[i][0]*AB[i][1] total total + AB[i][0]*AB[i][1] total AB[i][0]*AB[i][1] AB[i][0] [i] AB i 0 AB[i][1] [i] AB i 1 M = M - AB[i][1] M M - AB[i][1] M AB[i][1] [i] AB i 1 print(total) print total AB =[list(map(int,input().split())) for i in range(N)] [list(map(int,input().split())) for i in range(N)] AB M = M - AB[i][1] M - AB[i][1] M total = total + AB[i][0]*M total + AB[i][0]*M total N,M = map(int,input().split()) map(int,input().split()) N M = map(int,input().split()) map(int,input().split()) M total=0 0 total AB = sorted(AB) sorted(AB) AB total = total + AB[i][0]*AB[i][1] total + AB[i][0]*AB[i][1] total
N,M = map(int,input().split())
AB =[list(map(int,input().split())) for i in range(N)]

AB = sorted(AB)
total=0
for i in range(N):
    if AB[i][1]>M:
        total = total + AB[i][0]*M
        break
    else:
        total = total + AB[i][0]*AB[i][1]
        M = M - AB[i][1]

print(total)