n,m = gets.split.map {|x| x.to_i}

arr = []
n.times {
  a,b = gets.split.map {|x| x.to_i}
  arr << [a,b]
}
arr.sort! {|x,y| x[0] <=> y[0]}

c = 0
arr.each { |v|
  flag = false
  if (m > v[1])
    buy = v[1]
  else
    buy = m
    flag = true
  end
  c += buy * v[0]
  if flag
    puts c
    exit
  end
  m -= buy
}
