import future, strutils, algorithm


proc nextString: string =
    result = ""
    while not endOfFile stdin:
        let c = readChar stdin
        if c == ' ' or c == "\n"[0]: break
        elif c != '\r': add result, c


proc nextInt: int =
    parseInt nextString()


type
    katana = tuple[wield, throw: int]

var
    n, h = nextInt()
    swords = lc[(nextInt(), nextInt()) | (i <- 0 ..< n), katana]
    cnt = 0


proc main: void =
    swords = swords.sortedByIt((it.wield, -it.throw))
    let mainSword = swords.pop
    reverse swords

    while h > 0:
        inc cnt
        if mainSword.throw >= h:
            h -= mainSword.throw
        elif swords.len > 0 and mainSword.wield < swords[^1].throw:
            h -= swords.pop.throw
        else:
            h -= mainSword.throw
            cnt += 1 + (h - 1) div mainSword.wield
            break
    echo cnt


when ismainmodule:
    main()
