def attack(AB,H,N):
    AB.sort(key = lambda x:x[1])
    count = 0
    while H > 0:
        if AB[N-1][1] >= H:
            count += 1
            H = 0
            N -= 1
        elif len(AB) >= 2:
            if AB[N-1][0] >= AB[N-2][1]:
                num = (H-AB[N-1][1])//AB[N-1][0]
                H -= num*AB[N-1][0]
                count += num
                if H > AB[N-1][1]:
                    H -= AB[N-1][0]
                    count += 1
            else:
                count += 1
                H -= AB[N-1][1]
                N -= 1
        else:
            num = (H-AB[N-1][1])//AB[N-1][0]
            H -= num*AB[N-1][0]
            count += num
            if H > AB[N-1][1]:
                H -= AB[N-1][0]
                count += 1

    return count

def main():
    N,H = map(int,input().split())
    AB = [list(map(int,input().split())) for _ in range(N)]

    print(attack(AB,H,N))

if __name__ == "__main__":
    main()
