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

from operator import itemgetter
from itertools import chain

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

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
while b > 0:
    if data[0][1]:
        b -= data.pop(0)[0]
        count += 1
        continue
    else:
        count += int(b/data[0][0])
        break
print(count)
