function Main (input) {
  const inputs = input.split(/\s/g).filter((value) => value).map((value) => parseInt(value));
  const types = inputs[0];
  var material = inputs[1];
  const needs = inputs.slice(2);
  var counter = 0;

  // 1種類ずつ作る
  needs.forEach((need) => material -= parseInt(need));
  if (needs < 0) return console.log('%s', counter);
  counter = needs.length;

  // 使えるとこまで使う
  needs.sort((a, b) => a - b);
  needs.forEach((value) => {
    const divid = Math.floor(material / value);
    if (divid < 1) return;
    material -= value * divid;
    counter += divid;
  });

  console.log('%s', counter);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));
