use proconio::input;
use std::collections::BTreeMap;
use std::cmp::Reverse;

fn main() {
    input! {
        n: usize,
        mut h: usize,
        ab: [(usize, usize); n],
    }

    let mut map = BTreeMap::new();

    for (a, b) in ab {
        if map.get(&Reverse(a)).is_none() {
            map.insert(Reverse(a), h);
        }
        if let Some(val) = map.get_mut(&Reverse(b)) {
            *val += 1;
        } else {
            map.insert(Reverse(b), 1);
        }
    }

    let mut count = 0_u64;

    'o: for (Reverse(key), val) in map.into_iter() {
        for _ in 0..val {
            if h <= key {
                count += 1;
                break 'o;
            } else {
                count += 1;
                h -= key;
            }
        }
    }

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