ab=[]
n,m=gets.split.map(&:to_i)
for i in 0...n do
  a,b=gets.split.map(&:to_i)
  ab[i]=[a,b]
end
ab.sort!{|c,d| c[0]<=>d[0]}
sum=0
cnt=0
for i in 0...n do
  if cnt+ab[i][1]<m
    sum += ab[i][0]*ab[i][1]
    cnt += ab[i][1]
  else
    sum += (m-cnt)*ab[i][0]
    p sum
    exit
  end
end  