use std::io::{read_to_string, stdin};

fn main() {
    let temp = read_to_string(stdin()).unwrap();
    let mut iter = temp
        .split_ascii_whitespace()
        .map(|x| x.parse::<usize>().unwrap());

    let n = iter.next().unwrap();
    let mut ta = iter.next().unwrap();
    let mut tv = 0;
    let mut items = (0..n)
        .map(|_| (iter.next().unwrap(), iter.next().unwrap()))
        .collect::<Vec<_>>();

    items.sort();

    while ta > 0 && items.len() > 0 {
        let (v, a) = items.pop().unwrap();
        if a >= ta {
            tv += v * ta;
            ta = 0;
        } else {
            tv += v * a;
            ta -= a;
        }
    }

    println!("{}", tv);
}
