function Main(input) {
    let condition = input.split("");
    let types = condition[0], gram = condition[1];
    let menus = [], num = 0, doughnout;
    for (let i = 0; i < types; i++) {
        num++;
        doughnout = input[0];
        if (input[0] < doughnout) {
            doughnout = input[0];
        }
        gram -= doughnout;
    }
    while (doughnout < gram) {
        num++;
        gram -= doughnout;
    }
    console.log(num);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));