# https://abc085.contest.atcoder.jp/tasks/abc085_d

from math import ceil
from operator import itemgetter
from itertools import chain, takewhile

def trans(lst):
    return ((int(lst[0]), False), (int(lst[1]), True))

def main():
    a,b = map(int, input().split())
    data = list(chain.from_iterable([trans(input().split()) for _ in range(a)]))
    data.sort(key=itemgetter(0), reverse=True)

    count = 0

    throw_lst = list(zip(*takewhile(itemgetter(1), data)))[0]
    b -= sum(throw_lst)
    count += len(throw_lst)
    if b <= 0:
        print(count)
    else:
        count += ceil(b/data[count][0])
        print(count)

if __name__ == "__main__":
    main()
