from math import ceil

n,h = (int(i) for i in input().split())

a = []

b = [0]

for i in range(n):

 tmp1,tmp2= (int(i) for i in input().split())

 a.append(tmp1)

 b.append(tmp2)

a2 = sorted(a,reverse = True)

b2 = sorted(b,reverse = True)



count  = 0

while h > 0:

  if a2[0] > b2[0]:

    tmp3 = ceil(h/a2[0])

    count += tmp3

    h -= tmp3*a2[0]

  else:

    count += 1

    h -= b2[0]

    b2.pop(0)

print(count)
import sys

input = sys.stdin.readline

from collections import deque

import math

def solve():

  n,h = (int(i) for i in input().split())

  a = []

  b = []

  for i in range(n):

    ta,tb = (int(i) for i in input().split())

    a.append(ta)

    b.append(tb)

  amax = max(a)

  b = deque(sorted(b,reverse=True))

  

  damage = 0

  ct = 0

  while damage < h:

    if len(b):

      throw = b[0]

    else:

      throw = -99

      

    if throw > amax:

      throw = b.popleft()

      ct += 1

      damage += throw

      continue

    else:

      sabun = h-damage

      ct += math.ceil(sabun/amax)

      damage += amax*math.ceil(sabun/amax)

  print(ct)

solve()
from math import ceil

n, h = (int(i) for i in input().split())
a = []
b = [0]
for i in range(n):
    tmp1, tmp2 = (int(i) for i in input().split())
    a.append(tmp1)
    b.append(tmp2)
a2 = sorted(a, reverse=True)
b2 = sorted(b, reverse=True)
count = 0
while h > 0:
    if a2[0] > b2[0]:
        tmp3 = ceil(h / a2[0])
        count += tmp3
        h -= tmp3 * a2[0]
    else:
        count += 1
        h -= b2[0]
        b2.pop(0)
print(count)

import sys

input = sys.stdin.readline
from collections import deque
import math


def solve():
    n, h = (int(i) for i in input().split())
    a = []
    b = []
    for i in range(n):
        ta, tb = (int(i) for i in input().split())
        a.append(ta)
        b.append(tb)
    amax = max(a)
    b = deque(sorted(b, reverse=True))
    damage = 0
    ct = 0
    while damage < h:
        if len(b):
            throw = b[0]
        else:
            throw = -99
        if throw > amax:
            throw = b.popleft()
            ct += 1
            damage += throw
            continue
        else:
            sabun = h - damage
            ct += math.ceil(sabun / amax)
            damage += amax * math.ceil(sabun / amax)
    print(ct)


solve()

-from math import ceil +import sys -n, h = (int(i) for i in input().split()) -a = [] -b = [0] -for i in range(n): -    tmp1, tmp2 = (int(i) for i in input().split()) -    a.append(tmp1) -    b.append(tmp2) -a2 = sorted(a, reverse=True) -b2 = sorted(b, reverse=True) -count = 0 -while h > 0: -    if a2[0] > b2[0]: -        tmp3 = ceil(h / a2[0]) -        count += tmp3 -        h -= tmp3 * a2[0] -    else: -        count += 1 -        h -= b2[0] -        b2.pop(0) -print(count) +input = sys.stdin.readline +from collections import deque +import math + + +def solve(): +    n, h = (int(i) for i in input().split()) +    a = [] +    b = [] +    for i in range(n): +        ta, tb = (int(i) for i in input().split()) +        a.append(ta) +        b.append(tb) +    amax = max(a) +    b = deque(sorted(b, reverse=True)) +    damage = 0 +    ct = 0 +    while damage < h: +        if len(b): +            throw = b[0] +        else: +            throw = -99 +        if throw > amax: +            throw = b.popleft() +            ct += 1 +            damage += throw +            continue +        else: +            sabun = h - damage +            ct += math.ceil(sabun / amax) +            damage += amax * math.ceil(sabun / amax) +    print(ct) + + +solve()