int compare(const void *a,const void *b) {
    return *(int*)b - *(int*)a;
}

int main(void) {
    int n,h,i = 0,atack = 0,cou = 0,ko = 0;
    scanf("%d%d",&n,&h);
    int a[n],b[n];
    for (int i = 0; i < n; i++) {
        scanf("%d%d",&a[i],&b[i]);
        ko += b[i];
    }
    qsort(a, n, sizeof(int), compare);
    qsort(b, n, sizeof(int), compare);
    
    while (1) {
        if (h > ko) {
            h = h - a[0];
            i++;
        }
        if (a[0] < b[cou] && cou < n) {
            atack += b[0];
            b[0] = b[cou + 1];
            cou++;
        } else {
            atack += a[cou];
        }
        if (h <= atack) {
            break;
        }
        i++;
    }
    printf("%d\n",i);
    return 0;
}