function Main(a){a=a.split("\n");var e=a[0].split(" "),f=parseInt(e[0]);e=parseInt(e[1]);for(var c=[],g=0,b=1;b<f+1;b++){var d=arrayParseInt(a[b].split(" "));d[0]>g&&(g=d[0]);c.push(d)}for(b=f=a=0;b<c.length;b++)d=c[b],d[1]>g&&(a+=d[1],f++);for(c=0;e>a;)e-=g,c++;console.log(c+f)}function arrayParseInt(a){return a.map(function(a){return parseInt(a,10)})}Main(require("fs").readFileSync("/dev/stdin","utf8"));