local n, m = io.read("*n", "*n")
local t = {}
for i = 1, n do
  t[i] = {}
  t[i][1], t[i][2] = io.read("*n", "*n")
end
table.sort(t, function(x, y) return x[1] < y[1] end)
local ret = 0
for i = 1, n do
  if t[i][2] < m then
    m = m - t[i][2]
    ret = ret + t[i][1] * t[i][2]
  else
    ret = ret + t[i][1] * m
    m = 0
    break
  end
end
print(ret)
