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