XXI Berland Annual Fair is coming really soon! Traditionally fair consists of $$$n$$$ booths, arranged in a circle. The booths are numbered $$$1$$$ through $$$n$$$ clockwise with $$$n$$$ being adjacent to $$$1$$$. The $$$i$$$-th booths sells some candies for the price of $$$a_i$$$ burles per item. Each booth has an unlimited supply of candies.Polycarp has decided to spend at most $$$T$$$ burles at the fair. However, he has some plan in mind for his path across the booths:  at first, he visits booth number $$$1$$$;  if he has enough burles to buy exactly one candy from the current booth, then he buys it immediately;  then he proceeds to the next booth in the clockwise order (regardless of if he bought a candy or not). Polycarp's money is finite, thus the process will end once he can no longer buy candy at any booth.Calculate the number of candies Polycarp will buy.

The first line contains two integers $$$n$$$ and $$$T$$$ ($$$1 \le n \le 2 \cdot 10^5$$$, $$$1 \le T \le 10^{18}$$$) — the number of booths at the fair and the initial amount of burles Polycarp has. The second line contains $$$n$$$ integers $$$a_1, a_2, \dots, a_n$$$ ($$$1 \le a_i \le 10^9$$$) — the price of the single candy at booth number $$$i$$$.

Print a single integer — the total number of candies Polycarp will buy.

NoteLet's consider the first example. Here are Polycarp's moves until he runs out of money:  Booth $$$1$$$, buys candy for $$$5$$$, $$$T = 33$$$;  Booth $$$2$$$, buys candy for $$$2$$$, $$$T = 31$$$;  Booth $$$3$$$, buys candy for $$$5$$$, $$$T = 26$$$;  Booth $$$1$$$, buys candy for $$$5$$$, $$$T = 21$$$;  Booth $$$2$$$, buys candy for $$$2$$$, $$$T = 19$$$;  Booth $$$3$$$, buys candy for $$$5$$$, $$$T = 14$$$;  Booth $$$1$$$, buys candy for $$$5$$$, $$$T = 9$$$;  Booth $$$2$$$, buys candy for $$$2$$$, $$$T = 7$$$;  Booth $$$3$$$, buys candy for $$$5$$$, $$$T = 2$$$;  Booth $$$1$$$, buys no candy, not enough money;  Booth $$$2$$$, buys candy for $$$2$$$, $$$T = 0$$$. No candy can be bought later. The total number of candies bought is $$$10$$$.In the second example he has $$$1$$$ burle left at the end of his path, no candy can be bought with this amount.

var BigNum = {

    plus: function plus(number1, number2, minus1, minus2) {

        if (typeof number1 === 'number' && Math.abs(number1) < BigNum.limit2 &&
            typeof number2 === 'number' && Math.abs(number2) < BigNum.limit2)

            return number1 + number2;

        var result = [];

        var ranks1 = BigNum._getRanks(number1);
        var ranks2 = BigNum._getRanks(number2);

        if (minus1 === undefined) minus1 = ranks1.minus;
        if (minus2 === undefined) minus2 = ranks2.minus;

        if (!minus1) {
            if (minus2) {
                return BigNum.minus(ranks1, ranks2, false, false);
            }
        } else if (!minus2) {
            return BigNum.minus(ranks2, ranks1, false, false);
        } else {
            result.minus = true;
        }

        var maxRank = Math.max(ranks1.length, ranks2.length);
        for (var i = 0; i < maxRank; i++) {
            result[i] = (result[i] || 0)
                + (ranks1[i] || 0)
                + (ranks2[i] || 0);

            if (result[i] >= BigNum.limit) {
                result[i + 1] = 1;
                result[i] -= BigNum.limit;
            }
        }

        return result;
    },

    minus: function minus(number1, number2, minus1, minus2) {

        if (typeof number1 === 'number' && number1 < BigNum.limit2 &&
            typeof number2 === 'number' && number2 < BigNum.limit2)

            return number1 - number2;

        var result = [];

        var ranks1 = BigNum._getRanks(number1);
        var ranks2 = BigNum._getRanks(number2);

        if (minus1 === undefined) minus1 = ranks1.minus;
        if (minus2 === undefined) minus2 = ranks2.minus;

        if (!minus1) {
            if (minus2) {
                return BigNum.plus(ranks1, ranks2, false, false);
            }
        } else if (!minus2) {
            result = BigNum.plus(ranks1, ranks2, false, false);
            result.minus = true;
            return result;
        } else {
            return BigNum.minus(ranks2, ranks1, false, false);
        }

        var maxRank = Math.max(ranks1.length - 1, ranks2.length - 1);
        for (var i = maxRank; i >= 0; i--) {

            result[i] = (ranks1[i] || 0)
                - (ranks2[i] || 0);

            if (result[i] < 0) {
                if (result.minus === undefined) {
                    result.minus = true;
                    result[i] = -result[i];

                    var swap = ranks1;
                    ranks1 = ranks2;
                    ranks2 = swap;
                } else {
                    var j = i;
                    do {
                        result[j + 1] -= 1;
                        result[j] += BigNum.limit;
                    } while (result[++j] < 0);
                }
            } else if (result.minus === undefined && result[i] > 0) {
                result.minus = false;
            }
        }

        while(result[result.length - 1] === 0) {
            result.pop();
        }
        if (result.length < 3) {
            return BigNum.toInt(result);
        }

        return result;
    },

    multiply: function multiply(number1, number2) {

        if (typeof number1 === 'number' && number1 < BigNum.limit &&
            typeof number2 === 'number' && number2 < BigNum.limit)

            return number1 * number2;

        var result = [];

        var ranks1 = BigNum._getRanks(number1);
        var ranks2 = BigNum._getRanks(number2);

        for (var i = 0; i < ranks1.length; i++) {
            for (var j = 0; j < ranks2.length; j++) {
                var rank = i + j;
                var prod = ranks1[i] * ranks2[j];
                if (prod > BigNum.limit) {
                    result[rank] = (result[rank] || 0)
                        + prod % BigNum.limit;
                    result[rank + 1] = (result[rank + 1] || 0)
                        + Math.floor(prod / BigNum.limit);
                } else {
                    result[rank] = (result[rank] || 0)
                        + prod;
                }
            }
        }

        for (i = 0; i < result.length; i++) {
            if (result[i] > BigNum.limit) {
                result[i] -= BigNum.limit;
                result[i + 1] = (result[i + 1] || 0) + 1;
            }
        }

        result.minus = (ranks1.minus != ranks2.minus);
        return result;
    },

    divide: function divide(number1, number2) {

        if (typeof number1 === 'number' && number1 < BigNum.limit2 &&
            typeof number2 === 'number' && number2 < BigNum.limit2)

            return number1 / number2;

        var ranks1 = BigNum._getRanks(number1);
        var ranks2 = BigNum._getRanks(number2);

        var result = BigNum.toStr(ranks1) / BigNum.toStr(ranks2);
        return result;
    },

    toInt: function (number) {
        if (typeof number === 'object') {
            if(!number.length) return 0;
            else return +BigNum.toStr(number);
        }
        else return +number;
    },

    toStr: function (number) {

        if (typeof number === 'string') return number;
        else if(typeof number === 'number') return '' + number;

        var str = '';
        for (var i = 0; i < number.length - 1; i++) {
            str = ('000000' + number[i]).substr(-7) + str;
        }
        str = number[i] + str;
        return (number.minus ? '-' : '') + str;
    },

    more: function more(number1, number2) {

        var numberTypes = [typeof number1, typeof number2];

        if (numberTypes[1] === 'number' && Math.abs(number2) < BigNum.limit2) {
            if (numberTypes[0] === 'object' && number1[2]) {
                return true;
            } else if (numberTypes[0] === 'number' && Math.abs(number1) < BigNum.limit2) {
                return number1 > number2;
            }
        } else if (numberTypes[0] === 'number'
            && Math.abs(number1) < BigNum.limit2
            && numberTypes[1] === 'object'
            && number2[2]) {
                return false;
        }

        var ranks1 = BigNum._getRanks(number1);
        var ranks2 = BigNum._getRanks(number2);

        if (ranks1.minus) {
            if (!ranks2.minus) return false;
        } else if (ranks2.minus) {
            return true;
        }

        if (ranks1.length === ranks2.length) {
            for (var i = ranks1.length - 1; i >= 0; i--) {
                if (ranks1[i] > ranks2[i]) return true;
                else if (ranks1[i] !== ranks2[i]) return false;
            }
        } else if (ranks1.length > ranks2.length) {
            return true;
        }

        return false;
    },

    less: function less(number1, number2) {

        if (numberTypes[1] === 'number' && Math.abs(number2) < BigNum.limit2) {
            if (numberTypes[0] === 'object' && number1[2]) {
                return false;
            } else if (numberTypes[0] === 'number' && Math.abs(number1) < BigNum.limit2) {
                return number1 < number2;
            }
        } else if (numberTypes[0] === 'number'
            && Math.abs(number1) < BigNum.limit2
            && numberTypes[1] === 'object'
            && number2[2]) {
            return true;
        }

        var ranks1 = BigNum._getRanks(number1);
        var ranks2 = BigNum._getRanks(number2);

        if (ranks1.minus) {
            if (!ranks2.minus) return true;
        } else if (ranks2.minus) {
            return false;
        }

        if (ranks1.length === ranks2.length) {
            for (var i = ranks1.length - 1; i >= 0; i--) {
                if (ranks1[i] < ranks2[i]) return true;
                else if (ranks1[i] !== ranks2[i]) return false;
            }
        } else if (ranks1.length < ranks2.length) {
            return true;
        }

        return false;
    },

    equal: function equal(number1, number2) {

        if (typeof number1 === 'number' && number1 < BigNum.limit2 &&
            typeof number2 === 'number' && number2 < BigNum.limit2)

            return number1 === number2;

        var ranks1 = BigNum._getRanks(number1);
        var ranks2 = BigNum._getRanks(number2);

        var maxRank = Math.max(ranks1.length, ranks2.length);

        for (var i = maxRank; i >= 0; i--) {
            if (ranks1[i] !== ranks2[i]) return false;
        }

        return true;
    },

    getBig: function (number) {
        if (typeof number === 'string') {
            if (number.length < 16) return +number;
        }

        return BigNum._getRanks(number);
    },

    _getRanks: function (number) {

        if (typeof number === 'object') {
            return number;
        } else if (typeof number === 'number') {
            number = '' + number;
        }

        var ranks = [];
        if (number[0] === '-') {
            ranks.minus = true;
            number = number.substr(1);
        }

        if (number.length > 7) {

            number = '' + number;
            for (var i = 7; i <= number.length; i += 7) {
                ranks.push(+number.substr(-i, 7));
            }

            var rest = number.length % 7;
            if (rest) {
                ranks.push(+number.substr(0, rest));
            }

        } else {
            ranks.push(+number);
        }

        if (ranks[ranks.length - 1] < 0) {
            ranks[ranks.length - 1] = -ranks[ranks.length - 1];
            ranks.minus = true;
        }

        return ranks;
    },

    /*    rand: function getRandomInt(min, max) {
            return Math.floor(Math.random() * (max - min)) + min;
        },

        runTests: function tests(count = 10) {
            var correct = 0;
            var values = [];
            for(var i = 0; i < count; i++) {
                var val1 = BigNum.rand(-999999999999999, 999999999999999);
                var val2 = BigNum.rand(-999999999999999, 999999999999999);

                var resBn = BigNum.plus(val1, val2);
                var resBnInt = BigNum.toInt(resBN);
                var res = val1 + val2;

                if(resBNInt !== res) {
                    console.log('!!! ' + val1 + ' + ' + val2);
                    console.log('   BN: ' + resBNInt);
                    console.log('   Nm: ' + res);
                } else {
                    correct++;
                }

                resBn = BigNum.minus(val1, val2);
                resBnInt = BigNum.toInt(resBN);
                res = val1 - val2;

                if(resBNInt !== res) {
                    console.log('!!! ' + val1 + ' - ' + val2);
                    console.log('   BN: ' + resBNInt);
                    console.log('   Nm: ' + res);
                } else {
                    correct++;
                }

                resBn = BigNum.divide(val1, val2);
                resBnInt = Math.round(resBN, 4);
                res = Math.round(val1 / val2, 4);

                if(resBNInt !== res) {
                    console.log('!!! ' + val1 + ' / ' + val2);
                    console.log('   BN: ' + resBNInt);
                    console.log('   Nm: ' + res);
                } else {
                    correct++;
                }

                resBn = BigNum.more(val1, val2);
                res = val1 > val2;

                if(resBN !== res) {
                    console.log('!!! ' + val1 + ' > ' + val2);
                    console.log('   BN: ' + resBN);
                    console.log('   Nm: ' + res);
                } else {
                    correct++;
                }

                resBn = BigNum.less(val1, val2);
                res = val1 < val2;

                if(resBN !== res) {
                    console.log('!!! ' + val1 + ' < ' + val2);
                    console.log('   BN: ' + resBN);
                    console.log('   Nm: ' + res);
                } else {
                    correct++;
                }

                val1 = BigNum.rand(-99999999, 99999999);
                val2 = BigNum.rand(-9999999, 9999999);

                resBn = BigNum.multiply(val1, val2);
                resBnInt = BigNum.toInt(resBN);
                res = Math.round(val1 * val2, 4);

                if(resBNInt !== res) {
                    console.log('!!! ' + val1 + ' * ' + val2);
                    console.log('   BN: ' + resBNInt);
                    console.log('   Nm: ' + res);
                } else {
                    correct++;
                }

                resBn = BigNum.equal(val1, val2);
                res = val1 === val2;

                if(resBN !== res) {
                    console.log('!!! ' + val1 + ' === ' + val2);
                    console.log('   BN: ' + resBN);
                    console.log('   Nm: ' + res);
                } else {
                    correct++;
                }

                resBn = BigNum.equal(val1, val1);
                res = val1 === val1;

                if(resBN !== res) {
                    console.log('!!! ' + val1 + ' === ' + val1);
                    console.log('   BN: ' + resBN);
                    console.log('   Nm: ' + res);
                } else {
                    correct++;
                }

            }
            console.log('correct:' + correct);

        },

        runTimeTests: function timeTests(count = 10000, ranks = 15) {

            var max = Math.pow(10, ranks);

            var values = [];
            for(var i = 0; i < count; i++) {
                var val1 = BigNum.rand(-max, max);
                var val2 = BigNum.rand(-max, max);

                values.push([val1, val2]);
            }

            var testF = function (funcs, operation) {
                var results = [];
                for(var f = 0; f < 2; f++) {
                    var func = funcs[f];
                    var t = performance.now();
                    for(var i = 0; i < count; i++) {
                        res = func(values[i][0], values[i][1]);
                    }
                    results[f] =  Math.floor(performance.now() - t);
                }

                console.log('test ' + operation + ': diff ' + (results[1] - results[0]));
            }

            var testsFuncs = {
                plus: [
                    (val1, val2) => val1 + val2,
            (val1, val2) => BigNum.plus(val1, val2),
        ],

            minus: [
                (val1, val2) => val1 - val2,
                (val1, val2) => BigNum.minus(val1, val2),
        ],

            divide: [
                (val1, val2) => val1 / val2,
                (val1, val2) => BigNum.divide(val1, val2),
        ],

            miltiply: [
                (val1, val2) => val1 * val2,
                (val1, val2) => BigNum.multiply(val1, val2),
        ],
        };

            for(k in testsFuncs) {
                testF(testsFuncs[k], k);
            }
        },*/

    limit: 10000000,
    limit2: 100000000000000,
}
var run = 1;

if(run) {

    var money = BigNum.getBig(readline().split(' ')[1]);
    var prices = readline().split(' ').map(v=>+v);

    // var prices = [];
    // for (var i = 0; i < 200000; i++) {
    //     prices.push(500000000 + i);
    // }

    var roundSum, newRoundSum, sweeties = 0;

    do {
        roundSum = 0;

        var pricesSet = [];
        for (var i = 0; i < prices.length; i++) {
            var v = prices[i];
            newRoundSum = BigNum.plus(roundSum, v);

            if (BigNum.more(newRoundSum, money)) {
                continue;
            }

            roundSum = newRoundSum
            pricesSet.push(v);
        }

        prices = pricesSet;

        if (!roundSum) break;

        var fullRounds = Math.floor(BigNum.divide(money, roundSum));
        var spentMoney = BigNum.multiply(fullRounds, roundSum);

        var newSweeties = BigNum.multiply(fullRounds, prices.length);
        sweeties = BigNum.plus(newSweeties, sweeties);

        money = BigNum.minus(money, spentMoney);

        if (!money) break;
    } while (true)

    print(BigNum.toStr(sweeties));
}

var BigNum = {

    plus: function plus(number1, number2, minus1, minus2) {

        if (typeof number1 === 'number' && Math.abs(number1) < BigNum.limit2 &&
            typeof number2 === 'number' && Math.abs(number2) < BigNum.limit2)

            return number1 + number2;

        var result = [];

        var ranks1 = BigNum._getRanks(number1);
        var ranks2 = BigNum._getRanks(number2);

        if (minus1 === undefined) minus1 = ranks1.minus;
        if (minus2 === undefined) minus2 = ranks2.minus;

        if (!minus1) {
            if (minus2) {
                return BigNum.minus(ranks1, ranks2, false, false);
            }
        } else if (!minus2) {
            return BigNum.minus(ranks2, ranks1, false, false);
        } else {
            result.minus = true;
        }

        var maxRank = Math.max(ranks1.length, ranks2.length);
        for (var i = 0; i < maxRank; i++) {
            result[i] = (result[i] || 0)
                + (ranks1[i] || 0)
                + (ranks2[i] || 0);

            if (result[i] >= BigNum.limit) {
                result[i + 1] = 1;
                result[i] -= BigNum.limit;
            }
        }

        return result;
    },

    minus: function minus(number1, number2, minus1, minus2) {

        if (typeof number1 === 'number' && number1 < BigNum.limit2 &&
            typeof number2 === 'number' && number2 < BigNum.limit2)

            return number1 - number2;

        var result = [];

        var ranks1 = BigNum._getRanks(number1);
        var ranks2 = BigNum._getRanks(number2);

        if (minus1 === undefined) minus1 = ranks1.minus;
        if (minus2 === undefined) minus2 = ranks2.minus;

        if (!minus1) {
            if (minus2) {
                return BigNum.plus(ranks1, ranks2, false, false);
            }
        } else if (!minus2) {
            result = BigNum.plus(ranks1, ranks2, false, false);
            result.minus = true;
            return result;
        } else {
            return BigNum.minus(ranks2, ranks1, false, false);
        }

        var maxRank = Math.max(ranks1.length - 1, ranks2.length - 1);
        for (var i = maxRank; i >= 0; i--) {

            result[i] = (ranks1[i] || 0)
                - (ranks2[i] || 0);

            if (result[i] < 0) {
                if (result.minus === undefined) {
                    result.minus = true;
                    result[i] = -result[i];

                    var swap = ranks1;
                    ranks1 = ranks2;
                    ranks2 = swap;
                } else {
                    var j = i;
                    do {
                        result[j + 1] -= 1;
                        result[j] += BigNum.limit;
                    } while (result[++j] < 0);
                }
            } else if (result.minus === undefined && result[i] > 0) {
                result.minus = false;
            }
        }

        while(result[result.length - 1] === 0) {
            result.pop();
        }
        if (result.length < 3) {
            return BigNum.toInt(result);
        }

        return result;
    },

    multiply: function multiply(number1, number2) {

        if (typeof number1 === 'number' && number1 < BigNum.limit &&
            typeof number2 === 'number' && number2 < BigNum.limit)

            return number1 * number2;

        var result = [];

        var ranks1 = BigNum._getRanks(number1);
        var ranks2 = BigNum._getRanks(number2);

        for (var i = 0; i < ranks1.length; i++) {
            for (var j = 0; j < ranks2.length; j++) {
                var rank = i + j;
                var prod = ranks1[i] * ranks2[j];
                if (prod > BigNum.limit) {
                    result[rank] = (result[rank] || 0)
                        + prod % BigNum.limit;
                    result[rank + 1] = (result[rank + 1] || 0)
                        + Math.floor(prod / BigNum.limit);
                } else {
                    result[rank] = (result[rank] || 0)
                        + prod;
                }
            }
        }

        for (i = 0; i < result.length; i++) {
            if (result[i] > BigNum.limit) {
                result[i] -= BigNum.limit;
                result[i + 1] = (result[i + 1] || 0) + 1;
            }
        }

        result.minus = (ranks1.minus != ranks2.minus);
        return result;
    },

    divide: function divide(number1, number2) {

        if (typeof number1 === 'number' && number1 < BigNum.limit2 &&
            typeof number2 === 'number' && number2 < BigNum.limit2)

            return number1 / number2;

        var ranks1 = BigNum._getRanks(number1);
        var ranks2 = BigNum._getRanks(number2);

        var result = BigNum.toStr(ranks1) / BigNum.toStr(ranks2);
        return result;
    },

    toInt: function (number) {
        if (typeof number === 'object') {
            if(!number.length) return 0;
            else return +BigNum.toStr(number);
        }
        else return +number;
    },

    toStr: function (number) {

        if (typeof number === 'string') return number;

        var str = '';
        for (var i = 0; i < number.length - 1; i++) {
            str = ('000000' + number[i]).substr(-7) + str;
        }
        str = number[i] + str;
        return (number.minus ? '-' : '') + str;
    },

    more: function more(number1, number2) {

        var numberTypes = [typeof number1, typeof number2];

        if (numberTypes[1] === 'number' && Math.abs(number2) < BigNum.limit2) {
            if (numberTypes[0] === 'object' && number1[2]) {
                return true;
            } else if (numberTypes[0] === 'number' && Math.abs(number1) < BigNum.limit2) {
                return number1 > number2;
            }
        } else if (numberTypes[0] === 'number'
            && Math.abs(number1) < BigNum.limit2
            && numberTypes[1] === 'object'
            && number2[2]) {
                return false;
        }

        var ranks1 = BigNum._getRanks(number1);
        var ranks2 = BigNum._getRanks(number2);

        if (ranks1.minus) {
            if (!ranks2.minus) return false;
        } else if (ranks2.minus) {
            return true;
        }

        if (ranks1.length === ranks2.length) {
            for (var i = ranks1.length - 1; i >= 0; i--) {
                if (ranks1[i] > ranks2[i]) return true;
                else if (ranks1[i] !== ranks2[i]) return false;
            }
        } else if (ranks1.length > ranks2.length) {
            return true;
        }

        return false;
    },

    less: function less(number1, number2) {

        if (numberTypes[1] === 'number' && Math.abs(number2) < BigNum.limit2) {
            if (numberTypes[0] === 'object' && number1[2]) {
                return false;
            } else if (numberTypes[0] === 'number' && Math.abs(number1) < BigNum.limit2) {
                return number1 < number2;
            }
        } else if (numberTypes[0] === 'number'
            && Math.abs(number1) < BigNum.limit2
            && numberTypes[1] === 'object'
            && number2[2]) {
            return true;
        }

        var ranks1 = BigNum._getRanks(number1);
        var ranks2 = BigNum._getRanks(number2);

        if (ranks1.minus) {
            if (!ranks2.minus) return true;
        } else if (ranks2.minus) {
            return false;
        }

        if (ranks1.length === ranks2.length) {
            for (var i = ranks1.length - 1; i >= 0; i--) {
                if (ranks1[i] < ranks2[i]) return true;
                else if (ranks1[i] !== ranks2[i]) return false;
            }
        } else if (ranks1.length < ranks2.length) {
            return true;
        }

        return false;
    },

    equal: function equal(number1, number2) {

        if (typeof number1 === 'number' && number1 < BigNum.limit2 &&
            typeof number2 === 'number' && number2 < BigNum.limit2)

            return number1 === number2;

        var ranks1 = BigNum._getRanks(number1);
        var ranks2 = BigNum._getRanks(number2);

        var maxRank = Math.max(ranks1.length, ranks2.length);

        for (var i = maxRank; i >= 0; i--) {
            if (ranks1[i] !== ranks2[i]) return false;
        }

        return true;
    },

    getBig: function (number) {
        if (typeof number === 'string') {
            if (number.length < 16) return +number;
        }

        return BigNum._getRanks(number);
    },

    _getRanks: function (number) {

        if (typeof number === 'object') {
            return number;
        } else if (typeof number === 'number') {
            number = '' + number;
        }

        var ranks = [];
        if (number[0] === '-') {
            ranks.minus = true;
            number = number.substr(1);
        }

        if (number.length > 7) {

            number = '' + number;
            for (var i = 7; i <= number.length; i += 7) {
                ranks.push(+number.substr(-i, 7));
            }

            var rest = number.length % 7;
            if (rest) {
                ranks.push(+number.substr(0, rest));
            }

        } else {
            ranks.push(+number);
        }

        if (ranks[ranks.length - 1] < 0) {
            ranks[ranks.length - 1] = -ranks[ranks.length - 1];
            ranks.minus = true;
        }

        return ranks;
    },

    /*    rand: function getRandomInt(min, max) {
            return Math.floor(Math.random() * (max - min)) + min;
        },

        runTests: function tests(count = 10) {
            var correct = 0;
            var values = [];
            for(var i = 0; i < count; i++) {
                var val1 = BigNum.rand(-999999999999999, 999999999999999);
                var val2 = BigNum.rand(-999999999999999, 999999999999999);

                var resBn = BigNum.plus(val1, val2);
                var resBnInt = BigNum.toInt(resBN);
                var res = val1 + val2;

                if(resBNInt !== res) {
                    console.log('!!! ' + val1 + ' + ' + val2);
                    console.log('   BN: ' + resBNInt);
                    console.log('   Nm: ' + res);
                } else {
                    correct++;
                }

                resBn = BigNum.minus(val1, val2);
                resBnInt = BigNum.toInt(resBN);
                res = val1 - val2;

                if(resBNInt !== res) {
                    console.log('!!! ' + val1 + ' - ' + val2);
                    console.log('   BN: ' + resBNInt);
                    console.log('   Nm: ' + res);
                } else {
                    correct++;
                }

                resBn = BigNum.divide(val1, val2);
                resBnInt = Math.round(resBN, 4);
                res = Math.round(val1 / val2, 4);

                if(resBNInt !== res) {
                    console.log('!!! ' + val1 + ' / ' + val2);
                    console.log('   BN: ' + resBNInt);
                    console.log('   Nm: ' + res);
                } else {
                    correct++;
                }

                resBn = BigNum.more(val1, val2);
                res = val1 > val2;

                if(resBN !== res) {
                    console.log('!!! ' + val1 + ' > ' + val2);
                    console.log('   BN: ' + resBN);
                    console.log('   Nm: ' + res);
                } else {
                    correct++;
                }

                resBn = BigNum.less(val1, val2);
                res = val1 < val2;

                if(resBN !== res) {
                    console.log('!!! ' + val1 + ' < ' + val2);
                    console.log('   BN: ' + resBN);
                    console.log('   Nm: ' + res);
                } else {
                    correct++;
                }

                val1 = BigNum.rand(-99999999, 99999999);
                val2 = BigNum.rand(-9999999, 9999999);

                resBn = BigNum.multiply(val1, val2);
                resBnInt = BigNum.toInt(resBN);
                res = Math.round(val1 * val2, 4);

                if(resBNInt !== res) {
                    console.log('!!! ' + val1 + ' * ' + val2);
                    console.log('   BN: ' + resBNInt);
                    console.log('   Nm: ' + res);
                } else {
                    correct++;
                }

                resBn = BigNum.equal(val1, val2);
                res = val1 === val2;

                if(resBN !== res) {
                    console.log('!!! ' + val1 + ' === ' + val2);
                    console.log('   BN: ' + resBN);
                    console.log('   Nm: ' + res);
                } else {
                    correct++;
                }

                resBn = BigNum.equal(val1, val1);
                res = val1 === val1;

                if(resBN !== res) {
                    console.log('!!! ' + val1 + ' === ' + val1);
                    console.log('   BN: ' + resBN);
                    console.log('   Nm: ' + res);
                } else {
                    correct++;
                }

            }
            console.log('correct:' + correct);

        },

        runTimeTests: function timeTests(count = 10000, ranks = 15) {

            var max = Math.pow(10, ranks);

            var values = [];
            for(var i = 0; i < count; i++) {
                var val1 = BigNum.rand(-max, max);
                var val2 = BigNum.rand(-max, max);

                values.push([val1, val2]);
            }

            var testF = function (funcs, operation) {
                var results = [];
                for(var f = 0; f < 2; f++) {
                    var func = funcs[f];
                    var t = performance.now();
                    for(var i = 0; i < count; i++) {
                        res = func(values[i][0], values[i][1]);
                    }
                    results[f] =  Math.floor(performance.now() - t);
                }

                console.log('test ' + operation + ': diff ' + (results[1] - results[0]));
            }

            var testsFuncs = {
                plus: [
                    (val1, val2) => val1 + val2,
            (val1, val2) => BigNum.plus(val1, val2),
        ],

            minus: [
                (val1, val2) => val1 - val2,
                (val1, val2) => BigNum.minus(val1, val2),
        ],

            divide: [
                (val1, val2) => val1 / val2,
                (val1, val2) => BigNum.divide(val1, val2),
        ],

            miltiply: [
                (val1, val2) => val1 * val2,
                (val1, val2) => BigNum.multiply(val1, val2),
        ],
        };

            for(k in testsFuncs) {
                testF(testsFuncs[k], k);
            }
        },*/

    limit: 10000000,
    limit2: 100000000000000,
}
var run = 1;

if(run) {
    // var prices = [];
    // for (var i = 0; i < 200000; i++) {
    //     prices.push((i % 5) + 1);
    // }

    var money = BigNum.getBig(readline().split(' ')[1]);
    var prices = readline().split(' ').map(v=>+v);

    var roundSum, newRoundSum, sweeties = 0;

    do {
        roundSum = 0;

        var pricesSet = [];
        for (var i = 0; i < prices.length; i++) {
            var v = prices[i];
            newRoundSum = BigNum.plus(roundSum, v);

            if (BigNum.more(newRoundSum, money)) {
                continue;
            }

            roundSum = newRoundSum
            pricesSet.push(v);
        }

        prices = pricesSet;

        if (!roundSum) break;

        var fullRounds = Math.floor(BigNum.divide(money, roundSum));
        var spentMoney = BigNum.multiply(fullRounds, roundSum);

        var newSweeties = BigNum.multiply(fullRounds, prices.length);
        sweeties = BigNum.plus(newSweeties, sweeties);

        money = BigNum.minus(money, spentMoney);

        if (!money) break;
    } while (true)

    print(sweeties);
}

var BigNum = {
    plus(num1, num2) {
        return num1 + num2;
    },
    minus(num1, num2) {
        return num1 - num2;
    },
    multiply(num1, num2) {
        return num1 * num2;
    },
    divide(num1, num2) {
        return num1 / num2;
    },
    more(num1, num2) {
        return num1 > num2;
    },

    getBig: function (number) {
        if(typeof number === 'string') {
            if(number.length < 16) return +number;
        }

        return BigNum._getRanks(number);
    },

    _getRanks: function(number) {

        if(typeof number === 'object') {
            return number;
        } else if(typeof number === 'number') {
            number = '' + number;
        }

        var ranks = [];
        if(number[0] === '-') {
            ranks.minus = true;
            number = number.substr(1);
        }

        if(number.length > 7) {

            number = '' + number;
            for(var i = 7; i <= number.length; i+=7) {
                ranks.push(+number.substr(-i, 7));
            }

            var rest = number.length % 7;
            if(rest) {
                ranks.push(+ number.substr(0, rest));
            }

        } else {
            ranks.push(+number);
        }

        if(ranks[ranks.length - 1] < 0) {
            ranks[ranks.length - 1] = - ranks[ranks.length - 1];
            ranks.minus = true;
        }

        return ranks;
    }
};

var money = BigNum.getBig(readline().split(' ')[1]);
var prices = readline().split(' ').map(v=>+v);
var roundSum, newRoundSum, sweeties = 0;

do{
    roundSum = 0;

    var pricesSet = [];
    for(var i = 0; i < prices.length; i++) {
        var v = prices[i];
        newRoundSum = BigNum.plus(roundSum, v);

        if(BigNum.more(newRoundSum, money)) {
            continue;
        }

        roundSum = newRoundSum;
        pricesSet.push(v);
    }

    prices = pricesSet;

    if(!roundSum) break;

    var fullRounds = Math.floor(BigNum.divide(money, roundSum));
    var spentMoney = BigNum.multiply(fullRounds, roundSum);

    sweeties += fullRounds * prices.length;
    money = BigNum.minus(money, spentMoney);

    if(!money) break;
} while(true);

print(sweeties);

var BigNum = {
    getBig(num) {
        return num;
    },
    plus(num1, num2) {
        return num1 + num2;
    },
    minus(num1, num2) {
        return num1 - num2;
    },
    multiply(num1, num2) {
        return num1 * num2;
    },
    divide(num1, num2) {
        return num1 / num2;
    },
    more(num1, num2) {
        return num1 > num2;
    },
};

var money = BigNum.getBig(readline().split(' ')[1]);
var prices = readline().split(' ').map(v=>+v);
var roundSum, newRoundSum, sweeties = 0;

do{
    roundSum = 0;

    var pricesSet = [];
    for(var i = 0; i < prices.length; i++) {
        var v = prices[i];
        newRoundSum = BigNum.plus(roundSum, v);

        if(BigNum.more(newRoundSum, money)) {
            continue;
        }

        roundSum = newRoundSum;
        pricesSet.push(v);
    }

    prices = pricesSet;

    if(!roundSum) break;

    var fullRounds = Math.floor(BigNum.divide(money, roundSum));
    var spentMoney = BigNum.multiply(fullRounds, roundSum);

    sweeties += fullRounds * prices.length;
    money = BigNum.minus(money, spentMoney);

    if(!money) break;
} while(true);

print(sweeties);

var money = readline().split(' ').map(v=>+v)[1];
var prices = readline().split(' ').map(v=>+v);
var roundSum, sweeties = 0;

do{
    roundSum = 0;

    var pricesSet = [];
    for(var i = 0; i < prices.length; i++) {
        var v = prices[i];
        if(v > money) continue;

        roundSum += v;
        money -= v;
        pricesSet.push(v);
    }

    var eachOne = prices.length === pricesSet.length;
    prices = pricesSet;

    if(!roundSum) break;
    sweeties += prices.length;
    if(eachOne) {
        while(money > roundSum) {
            money -= roundSum;
            sweeties += prices.length;
        }
    }
    if(!money) break;
} while(true)

print(sweeties);

var money = readline().split(' ').map(v=>+v)[1];
var prices = readline().split(' ').map(v=>+v);
var roundSum, sweeties = 0, moneyCopy = 0;

do{
    roundSum = 0;

    var pricesSet = [];
    for(var i = 0; i < prices.length; i++) {
        var v = prices[i];
        if(v > money) continue;

        roundSum += v;
        money -= v;
        pricesSet.push(v);
    }
    prices = pricesSet;

    if(!roundSum) break;

    var fullRounds = Math.floor(money/roundSum) + 1;
    sweeties += fullRounds * prices.length;

    money -= (fullRounds - 1) * roundSum;
    if(!money) break;
} while(true)

print(sweeties);

var money = readline().split(' ').map(v=>+v)[1];
var prices = readline().split(' ').map(v=>+v);
var roundSum, sweeties = 0, moneyCopy = 0;

do{
    roundSum = 0;

    var pricesSet = [];
    for(var i = 0; i < prices.length; i++) {
        var v = prices[i];
        if(v > money) continue;

        roundSum += v;
        money -= v;
        pricesSet.push(v);
    }

    var eachOne = prices.length === pricesSet.length;
    prices = pricesSet;

    if(!roundSum) break;
    sweeties += prices.length;
    if(eachOne) {
        var fullRounds = Math.floor(money/roundSum);
        sweeties += fullRounds * prices.length;
        money -= fullRounds * roundSum;
    }
    if(!money) break;
} while(true)

print(sweeties);

var BigNum = {

    plus: function plus(number1, number2, minus1, minus2) {

        if (typeof number1 === 'number' && Math.abs(number1) < BigNum.limit2 &&
            typeof number2 === 'number' && Math.abs(number2) < BigNum.limit2)

            return number1 + number2;

        var result = [];

        var ranks1 = BigNum._getRanks(number1);
        var ranks2 = BigNum._getRanks(number2);

        if (minus1 === undefined) minus1 = ranks1.minus;
        if (minus2 === undefined) minus2 = ranks2.minus;

        if (!minus1) {
            if (minus2) {
                return BigNum.minus(ranks1, ranks2, false, false);
            }
        } else if (!minus2) {
            return BigNum.minus(ranks2, ranks1, false, false);
        } else {
            result.minus = true;
        }

        var maxRank = Math.max(ranks1.length, ranks2.length);
        for (var i = 0; i < maxRank; i++) {
            result[i] = (result[i] || 0)
                + (ranks1[i] || 0)
                + (ranks2[i] || 0);

            if (result[i] >= BigNum.limit) {
                result[i + 1] = 1;
                result[i] -= BigNum.limit;
            }
        }

        return result;
    },

    minus: function minus(number1, number2, minus1, minus2) {

        if (typeof number1 === 'number' && number1 < BigNum.limit2 &&
            typeof number2 === 'number' && number2 < BigNum.limit2)

            return number1 - number2;

        var result = [];

        var ranks1 = BigNum._getRanks(number1);
        var ranks2 = BigNum._getRanks(number2);

        if (minus1 === undefined) minus1 = ranks1.minus;
        if (minus2 === undefined) minus2 = ranks2.minus;

        if (!minus1) {
            if (minus2) {
                return BigNum.plus(ranks1, ranks2, false, false);
            }
        } else if (!minus2) {
            result = BigNum.plus(ranks1, ranks2, false, false);
            result.minus = true;
            return result;
        } else {
            return BigNum.minus(ranks2, ranks1, false, false);
        }

        var maxRank = Math.max(ranks1.length - 1, ranks2.length - 1);
        for (var i = maxRank; i >= 0; i--) {

            result[i] = (ranks1[i] || 0)
                - (ranks2[i] || 0);

            if (result[i] < 0) {
                if (result.minus === undefined) {
                    result.minus = true;
                    result[i] = -result[i];

                    var swap = ranks1;
                    ranks1 = ranks2;
                    ranks2 = swap;
                } else {
                    var j = i;
                    do {
                        result[j + 1] -= 1;
                        result[j] += BigNum.limit;
                    } while (result[++j] < 0);
                }
            } else if (result.minus === undefined && result[i] > 0) {
                result.minus = false;
            }
        }

        while(result[result.length - 1] === 0) {
            result.pop();
        }
        if (result.length < 3) {
            return BigNum.toInt(result);
        }

        return result;
    },

    multiply: function multiply(number1, number2) {

        if (typeof number1 === 'number' && number1 < BigNum.limit &&
            typeof number2 === 'number' && number2 < BigNum.limit)

            return number1 * number2;

        var result = [];

        var ranks1 = BigNum._getRanks(number1);
        var ranks2 = BigNum._getRanks(number2);

        for (var i = 0; i < ranks1.length; i++) {
            for (var j = 0; j < ranks2.length; j++) {
                var rank = i + j;
                var prod = ranks1[i] * ranks2[j];
                if (prod > BigNum.limit) {
                    result[rank] = (result[rank] || 0)
                        + prod % BigNum.limit;
                    result[rank + 1] = (result[rank + 1] || 0)
                        + Math.floor(prod / BigNum.limit);
                } else {
                    result[rank] = (result[rank] || 0)
                        + prod;
                }
            }
        }

        for (i = 0; i < result.length; i++) {
            if (result[i] > BigNum.limit) {
                result[i] -= BigNum.limit;
                result[i + 1] = (result[i + 1] || 0) + 1;
            }
        }

        result.minus = (ranks1.minus != ranks2.minus);
        return result;
    },

    divide: function divide(number1, number2) {

        if (typeof number1 === 'number' && number1 < BigNum.limit2 &&
            typeof number2 === 'number' && number2 < BigNum.limit2)

            return number1 / number2;

        var ranks1 = BigNum._getRanks(number1);
        var ranks2 = BigNum._getRanks(number2);

        var result = BigNum.toStr(ranks1) / BigNum.toStr(ranks2);
        return result;
    },

    toInt: function (number) {
        if (typeof number === 'object') {
            if(!number.length) return 0;
            else return +BigNum.toStr(number);
        }
        else return +number;
    },

    toStr: function (number) {

        if (typeof number === 'string') return number;

        var str = '';
        for (var i = 0; i < number.length - 1; i++) {
            str = ('000000' + number[i]).substr(-7) + str;
        }
        str = number[i] + str;
        return (number.minus ? '-' : '') + str;
    },

    more: function more(number1, number2) {

        var numberTypes = [typeof number1, typeof number2];

        if (numberTypes[1] === 'number' && Math.abs(number2) < BigNum.limit2) {
            if (numberTypes[0] === 'object' && number1[2]) {
                return true;
            } else if (numberTypes[0] === 'number' && Math.abs(number1) < BigNum.limit2) {
                return number1 > number2;
            }
        } else if (numberTypes[0] === 'number'
            && Math.abs(number1) < BigNum.limit2
            && numberTypes[1] === 'object'
            && number2[2]) {
                return false;
        }

        var ranks1 = BigNum._getRanks(number1);
        var ranks2 = BigNum._getRanks(number2);

        if (ranks1.minus) {
            if (!ranks2.minus) return false;
        } else if (ranks2.minus) {
            return true;
        }

        if (ranks1.length === ranks2.length) {
            for (var i = ranks1.length - 1; i >= 0; i--) {
                if (ranks1[i] > ranks2[i]) return true;
                else if (ranks1[i] !== ranks2[i]) return false;
            }
        } else if (ranks1.length > ranks2.length) {
            return true;
        }

        return false;
    },

    less: function less(number1, number2) {

        if (numberTypes[1] === 'number' && Math.abs(number2) < BigNum.limit2) {
            if (numberTypes[0] === 'object' && number1[2]) {
                return false;
            } else if (numberTypes[0] === 'number' && Math.abs(number1) < BigNum.limit2) {
                return number1 < number2;
            }
        } else if (numberTypes[0] === 'number'
            && Math.abs(number1) < BigNum.limit2
            && numberTypes[1] === 'object'
            && number2[2]) {
            return true;
        }

        var ranks1 = BigNum._getRanks(number1);
        var ranks2 = BigNum._getRanks(number2);

        if (ranks1.minus) {
            if (!ranks2.minus) return true;
        } else if (ranks2.minus) {
            return false;
        }

        if (ranks1.length === ranks2.length) {
            for (var i = ranks1.length - 1; i >= 0; i--) {
                if (ranks1[i] < ranks2[i]) return true;
                else if (ranks1[i] !== ranks2[i]) return false;
            }
        } else if (ranks1.length < ranks2.length) {
            return true;
        }

        return false;
    },

    equal: function equal(number1, number2) {

        if (typeof number1 === 'number' && number1 < BigNum.limit2 &&
            typeof number2 === 'number' && number2 < BigNum.limit2)

            return number1 === number2;

        var ranks1 = BigNum._getRanks(number1);
        var ranks2 = BigNum._getRanks(number2);

        var maxRank = Math.max(ranks1.length, ranks2.length);

        for (var i = maxRank; i >= 0; i--) {
            if (ranks1[i] !== ranks2[i]) return false;
        }

        return true;
    },

    getBig: function (number) {
        if (typeof number === 'string') {
            if (number.length < 16) return +number;
        }

        return BigNum._getRanks(number);
    },

    _getRanks: function (number) {

        if (typeof number === 'object') {
            return number;
        } else if (typeof number === 'number') {
            number = '' + number;
        }

        var ranks = [];
        if (number[0] === '-') {
            ranks.minus = true;
            number = number.substr(1);
        }

        if (number.length > 7) {

            number = '' + number;
            for (var i = 7; i <= number.length; i += 7) {
                ranks.push(+number.substr(-i, 7));
            }

            var rest = number.length % 7;
            if (rest) {
                ranks.push(+number.substr(0, rest));
            }

        } else {
            ranks.push(+number);
        }

        if (ranks[ranks.length - 1] < 0) {
            ranks[ranks.length - 1] = -ranks[ranks.length - 1];
            ranks.minus = true;
        }

        return ranks;
    },

    /*    rand: function getRandomInt(min, max) {
            return Math.floor(Math.random() * (max - min)) + min;
        },

        runTests: function tests(count = 10) {
            var correct = 0;
            var values = [];
            for(var i = 0; i < count; i++) {
                var val1 = BigNum.rand(-999999999999999, 999999999999999);
                var val2 = BigNum.rand(-999999999999999, 999999999999999);

                var resBn = BigNum.plus(val1, val2);
                var resBnInt = BigNum.toInt(resBN);
                var res = val1 + val2;

                if(resBNInt !== res) {
                    console.log('!!! ' + val1 + ' + ' + val2);
                    console.log('   BN: ' + resBNInt);
                    console.log('   Nm: ' + res);
                } else {
                    correct++;
                }

                resBn = BigNum.minus(val1, val2);
                resBnInt = BigNum.toInt(resBN);
                res = val1 - val2;

                if(resBNInt !== res) {
                    console.log('!!! ' + val1 + ' - ' + val2);
                    console.log('   BN: ' + resBNInt);
                    console.log('   Nm: ' + res);
                } else {
                    correct++;
                }

                resBn = BigNum.divide(val1, val2);
                resBnInt = Math.round(resBN, 4);
                res = Math.round(val1 / val2, 4);

                if(resBNInt !== res) {
                    console.log('!!! ' + val1 + ' / ' + val2);
                    console.log('   BN: ' + resBNInt);
                    console.log('   Nm: ' + res);
                } else {
                    correct++;
                }

                resBn = BigNum.more(val1, val2);
                res = val1 > val2;

                if(resBN !== res) {
                    console.log('!!! ' + val1 + ' > ' + val2);
                    console.log('   BN: ' + resBN);
                    console.log('   Nm: ' + res);
                } else {
                    correct++;
                }

                resBn = BigNum.less(val1, val2);
                res = val1 < val2;

                if(resBN !== res) {
                    console.log('!!! ' + val1 + ' < ' + val2);
                    console.log('   BN: ' + resBN);
                    console.log('   Nm: ' + res);
                } else {
                    correct++;
                }

                val1 = BigNum.rand(-99999999, 99999999);
                val2 = BigNum.rand(-9999999, 9999999);

                resBn = BigNum.multiply(val1, val2);
                resBnInt = BigNum.toInt(resBN);
                res = Math.round(val1 * val2, 4);

                if(resBNInt !== res) {
                    console.log('!!! ' + val1 + ' * ' + val2);
                    console.log('   BN: ' + resBNInt);
                    console.log('   Nm: ' + res);
                } else {
                    correct++;
                }

                resBn = BigNum.equal(val1, val2);
                res = val1 === val2;

                if(resBN !== res) {
                    console.log('!!! ' + val1 + ' === ' + val2);
                    console.log('   BN: ' + resBN);
                    console.log('   Nm: ' + res);
                } else {
                    correct++;
                }

                resBn = BigNum.equal(val1, val1);
                res = val1 === val1;

                if(resBN !== res) {
                    console.log('!!! ' + val1 + ' === ' + val1);
                    console.log('   BN: ' + resBN);
                    console.log('   Nm: ' + res);
                } else {
                    correct++;
                }

            }
            console.log('correct:' + correct);

        },

        runTimeTests: function timeTests(count = 10000, ranks = 15) {

            var max = Math.pow(10, ranks);

            var values = [];
            for(var i = 0; i < count; i++) {
                var val1 = BigNum.rand(-max, max);
                var val2 = BigNum.rand(-max, max);

                values.push([val1, val2]);
            }

            var testF = function (funcs, operation) {
                var results = [];
                for(var f = 0; f < 2; f++) {
                    var func = funcs[f];
                    var t = performance.now();
                    for(var i = 0; i < count; i++) {
                        res = func(values[i][0], values[i][1]);
                    }
                    results[f] =  Math.floor(performance.now() - t);
                }

                console.log('test ' + operation + ': diff ' + (results[1] - results[0]));
            }

            var testsFuncs = {
                plus: [
                    (val1, val2) => val1 + val2,
            (val1, val2) => BigNum.plus(val1, val2),
        ],

            minus: [
                (val1, val2) => val1 - val2,
                (val1, val2) => BigNum.minus(val1, val2),
        ],

            divide: [
                (val1, val2) => val1 / val2,
                (val1, val2) => BigNum.divide(val1, val2),
        ],

            miltiply: [
                (val1, val2) => val1 * val2,
                (val1, val2) => BigNum.multiply(val1, val2),
        ],
        };

            for(k in testsFuncs) {
                testF(testsFuncs[k], k);
            }
        },*/

    limit: 10000000,
    limit2: 100000000000000,
}
var run = 1;

if(run) {

    var money = BigNum.getBig(readline().split(' ')[1]);
    var prices = readline().split(' ').map(v=>+v);

    // var prices = [];
    // for (var i = 0; i < 200000; i++) {
    //     prices.push(1);
    // }

    var roundSum, newRoundSum, sweeties = 0;

    do {
        roundSum = 0;

        var pricesSet = [];
        for (var i = 0; i < prices.length; i++) {
            var v = prices[i];
            newRoundSum = BigNum.plus(roundSum, v);

            if (BigNum.more(newRoundSum, money)) {
                continue;
            }

            roundSum = newRoundSum
            pricesSet.push(v);
        }

        prices = pricesSet;

        if (!roundSum) break;

        var fullRounds = Math.floor(BigNum.divide(money, roundSum));
        var spentMoney = BigNum.multiply(fullRounds, roundSum);

        var newSweeties = BigNum.multiply(fullRounds, prices.length);
        sweeties = BigNum.plus(newSweeties, sweeties);

        money = BigNum.minus(money, spentMoney);

        if (!money) break;
    } while (true)

    print(BigNum.toStr(sweeties));
}

var BigNum = {
    plus: function(number1, number2, minus1, minus2) {

        if(typeof number1 === 'number' && Math.abs(number1) < BigNum.limit2 &&
            typeof number2 === 'number' && Math.abs(number2) < BigNum.limit2)

            return number1 + number2;

        var result = [];

        var ranks1 = BigNum._getRanks(number1);
        var ranks2 = BigNum._getRanks(number2);

        if(minus1 === undefined) minus1 = ranks1.minus;
        if(minus2 === undefined) minus2 = ranks2.minus;

        if(!minus1) {
            if(minus2) {
                return BigNum.minus(ranks1, ranks2, false, false);
            }
        } else if(!minus2) {
            return BigNum.minus(ranks2, ranks1, false, false);
        } else {
            result.minus = true;
        }

        var maxRank = Math.max(ranks1.length, ranks2.length);
        for(var i = 0; i < maxRank; i++) {
            result[i] = (result[i] || 0)
                + (ranks1[i] || 0)
                + (ranks2[i] || 0);

            if(result[i] >= BigNum.limit) {
                result[i + 1] = 1;
                result[i] -= BigNum.limit;
            }
        }

        return result;
    },
    minus(num1, num2) {
        return num1 - num2;
    },
    multiply(num1, num2) {
        return num1 * num2;
    },
    divide(num1, num2) {
        return num1 / num2;
    },
    more(num1, num2) {
        return num1 > num2;
    },

    getBig: function (number) {
        if(typeof number === 'string') {
            if(number.length < 16) return +number;
        }

        return BigNum._getRanks(number);
    },

    _getRanks: function(number) {

        if(typeof number === 'object') {
            return number;
        } else if(typeof number === 'number') {
            number = '' + number;
        }

        var ranks = [];
        if(number[0] === '-') {
            ranks.minus = true;
            number = number.substr(1);
        }

        if(number.length > 7) {

            number = '' + number;
            for(var i = 7; i <= number.length; i+=7) {
                ranks.push(+number.substr(-i, 7));
            }

            var rest = number.length % 7;
            if(rest) {
                ranks.push(+ number.substr(0, rest));
            }

        } else {
            ranks.push(+number);
        }

        if(ranks[ranks.length - 1] < 0) {
            ranks[ranks.length - 1] = - ranks[ranks.length - 1];
            ranks.minus = true;
        }

        return ranks;
    },

    limit: 10000000,
    limit2: 100000000000000,
};

var money = BigNum.getBig(readline().split(' ')[1]);
var prices = readline().split(' ').map(v=>+v);
var roundSum, newRoundSum, sweeties = 0;

do{
    roundSum = 0;

    var pricesSet = [];
    for(var i = 0; i < prices.length; i++) {
        var v = prices[i];
        newRoundSum = BigNum.plus(roundSum, v);

        if(BigNum.more(newRoundSum, money)) {
            continue;
        }

        roundSum = newRoundSum;
        pricesSet.push(v);
    }

    prices = pricesSet;

    if(!roundSum) break;

    var fullRounds = Math.floor(BigNum.divide(money, roundSum));
    var spentMoney = BigNum.multiply(fullRounds, roundSum);

    sweeties += fullRounds * prices.length;
    money = BigNum.minus(money, spentMoney);

    if(!money) break;
} while(true);

print(sweeties);

var BigNum = {

    plus: function plus(number1, number2, minus1, minus2) {

        if (typeof number1 === 'number' && Math.abs(number1) < BigNum.limit2 &&
            typeof number2 === 'number' && Math.abs(number2) < BigNum.limit2)

            return number1 + number2;

        var result = [];

        var ranks1 = BigNum._getRanks(number1);
        var ranks2 = BigNum._getRanks(number2);

        if (minus1 === undefined) minus1 = ranks1.minus;
        if (minus2 === undefined) minus2 = ranks2.minus;

        if (!minus1) {
            if (minus2) {
                return BigNum.minus(ranks1, ranks2, false, false);
            }
        } else if (!minus2) {
            return BigNum.minus(ranks2, ranks1, false, false);
        } else {
            result.minus = true;
        }

        var maxRank = Math.max(ranks1.length, ranks2.length);
        for (var i = 0; i < maxRank; i++) {
            result[i] = (result[i] || 0)
                + (ranks1[i] || 0)
                + (ranks2[i] || 0);

            if (result[i] >= BigNum.limit) {
                result[i + 1] = 1;
                result[i] -= BigNum.limit;
            }
        }

        return result;
    },

    minus: function minus(number1, number2, minus1, minus2) {

        if (typeof number1 === 'number' && number1 < BigNum.limit2 &&
            typeof number2 === 'number' && number2 < BigNum.limit2)

            return number1 - number2;

        var result = [];

        var ranks1 = BigNum._getRanks(number1);
        var ranks2 = BigNum._getRanks(number2);

        if (minus1 === undefined) minus1 = ranks1.minus;
        if (minus2 === undefined) minus2 = ranks2.minus;

        if (!minus1) {
            if (minus2) {
                return BigNum.plus(ranks1, ranks2, false, false);
            }
        } else if (!minus2) {
            result = BigNum.plus(ranks1, ranks2, false, false);
            result.minus = true;
            return result;
        } else {
            return BigNum.minus(ranks2, ranks1, false, false);
        }

        var maxRank = Math.max(ranks1.length - 1, ranks2.length - 1);
        for (var i = maxRank; i >= 0; i--) {

            result[i] = (ranks1[i] || 0)
                - (ranks2[i] || 0);

            if (result[i] < 0) {
                if (result.minus === undefined) {
                    result.minus = true;
                    result[i] = -result[i];

                    var swap = ranks1;
                    ranks1 = ranks2;
                    ranks2 = swap;
                } else {
                    var j = i;
                    do {
                        result[j + 1] -= 1;
                        result[j] += BigNum.limit;
                    } while (result[++j] < 0);
                }
            } else if (result.minus === undefined && result[i] > 0) {
                result.minus = false;
            }
        }

        while(result[result.length - 1] === 0) {
            result.pop();
        }
        if (result.length < 3) {
            return BigNum.toInt(result);
        }

        return result;
    },

    multiply: function multiply(number1, number2) {

        if (typeof number1 === 'number' && number1 < BigNum.limit &&
            typeof number2 === 'number' && number2 < BigNum.limit)

            return number1 * number2;

        var result = [];

        var ranks1 = BigNum._getRanks(number1);
        var ranks2 = BigNum._getRanks(number2);

        for (var i = 0; i < ranks1.length; i++) {
            for (var j = 0; j < ranks2.length; j++) {
                var rank = i + j;
                var prod = ranks1[i] * ranks2[j];
                if (prod > BigNum.limit) {
                    result[rank] = (result[rank] || 0)
                        + prod % BigNum.limit;
                    result[rank + 1] = (result[rank + 1] || 0)
                        + Math.floor(prod / BigNum.limit);
                } else {
                    result[rank] = (result[rank] || 0)
                        + prod;
                }
            }
        }

        for (i = 0; i < result.length; i++) {
            if (result[i] > BigNum.limit) {
                result[i] -= BigNum.limit;
                result[i + 1] = (result[i + 1] || 0) + 1;
            }
        }

        result.minus = (ranks1.minus != ranks2.minus);
        return result;
    },

    divide: function divide(number1, number2) {

        if (typeof number1 === 'number' && number1 < BigNum.limit2 &&
            typeof number2 === 'number' && number2 < BigNum.limit2)

            return number1 / number2;

        var ranks1 = BigNum._getRanks(number1);
        var ranks2 = BigNum._getRanks(number2);

        var result = BigNum.toStr(ranks1) / BigNum.toStr(ranks2);
        return result;
    },

    toInt: function (number) {
        if (typeof number === 'object') {
            if(!number.length) return 0;
            else return +BigNum.toStr(number);
        }
        else return +number;
    },

    toStr: function (number) {

        if (typeof number === 'string') return number;

        var str = '';
        for (var i = 0; i < number.length - 1; i++) {
            str = ('000000' + number[i]).substr(-7) + str;
        }
        str = number[i] + str;
        return (number.minus ? '-' : '') + str;
    },

    more: function more(number1, number2) {

        var numberTypes = [typeof number1, typeof number2];

        if (numberTypes[1] === 'number' && Math.abs(number2) < BigNum.limit2) {
            if (numberTypes[0] === 'object' && number1[2]) {
                return true;
            } else if (numberTypes[0] === 'number' && Math.abs(number1) < BigNum.limit2) {
                return number1 > number2;
            }
        } else if (numberTypes[0] === 'number'
            && Math.abs(number1) < BigNum.limit2
            && numberTypes[1] === 'object'
            && number2[2]) {
                return false;
        }

        var ranks1 = BigNum._getRanks(number1);
        var ranks2 = BigNum._getRanks(number2);

        if (ranks1.minus) {
            if (!ranks2.minus) return false;
        } else if (ranks2.minus) {
            return true;
        }

        if (ranks1.length === ranks2.length) {
            for (var i = ranks1.length - 1; i >= 0; i--) {
                if (ranks1[i] > ranks2[i]) return true;
                else if (ranks1[i] !== ranks2[i]) return false;
            }
        } else if (ranks1.length > ranks2.length) {
            return true;
        }

        return false;
    },

    less: function less(number1, number2) {

        if (numberTypes[1] === 'number' && Math.abs(number2) < BigNum.limit2) {
            if (numberTypes[0] === 'object' && number1[2]) {
                return false;
            } else if (numberTypes[0] === 'number' && Math.abs(number1) < BigNum.limit2) {
                return number1 < number2;
            }
        } else if (numberTypes[0] === 'number'
            && Math.abs(number1) < BigNum.limit2
            && numberTypes[1] === 'object'
            && number2[2]) {
            return true;
        }

        var ranks1 = BigNum._getRanks(number1);
        var ranks2 = BigNum._getRanks(number2);

        if (ranks1.minus) {
            if (!ranks2.minus) return true;
        } else if (ranks2.minus) {
            return false;
        }

        if (ranks1.length === ranks2.length) {
            for (var i = ranks1.length - 1; i >= 0; i--) {
                if (ranks1[i] < ranks2[i]) return true;
                else if (ranks1[i] !== ranks2[i]) return false;
            }
        } else if (ranks1.length < ranks2.length) {
            return true;
        }

        return false;
    },

    equal: function equal(number1, number2) {

        if (typeof number1 === 'number' && number1 < BigNum.limit2 &&
            typeof number2 === 'number' && number2 < BigNum.limit2)

            return number1 === number2;

        var ranks1 = BigNum._getRanks(number1);
        var ranks2 = BigNum._getRanks(number2);

        var maxRank = Math.max(ranks1.length, ranks2.length);

        for (var i = maxRank; i >= 0; i--) {
            if (ranks1[i] !== ranks2[i]) return false;
        }

        return true;
    },

    getBig: function (number) {
        if (typeof number === 'string') {
            if (number.length < 16) return +number;
        }

        return BigNum._getRanks(number);
    },

    _getRanks: function (number) {

        if (typeof number === 'object') {
            return number;
        } else if (typeof number === 'number') {
            number = '' + number;
        }

        var ranks = [];
        if (number[0] === '-') {
            ranks.minus = true;
            number = number.substr(1);
        }

        if (number.length > 7) {

            number = '' + number;
            for (var i = 7; i <= number.length; i += 7) {
                ranks.push(+number.substr(-i, 7));
            }

            var rest = number.length % 7;
            if (rest) {
                ranks.push(+number.substr(0, rest));
            }

        } else {
            ranks.push(+number);
        }

        if (ranks[ranks.length - 1] < 0) {
            ranks[ranks.length - 1] = -ranks[ranks.length - 1];
            ranks.minus = true;
        }

        return ranks;
    },

    /*    rand: function getRandomInt(min, max) {
            return Math.floor(Math.random() * (max - min)) + min;
        },

        runTests: function tests(count = 10) {
            var correct = 0;
            var values = [];
            for(var i = 0; i < count; i++) {
                var val1 = BigNum.rand(-999999999999999, 999999999999999);
                var val2 = BigNum.rand(-999999999999999, 999999999999999);

                var resBn = BigNum.plus(val1, val2);
                var resBnInt = BigNum.toInt(resBN);
                var res = val1 + val2;

                if(resBNInt !== res) {
                    console.log('!!! ' + val1 + ' + ' + val2);
                    console.log('   BN: ' + resBNInt);
                    console.log('   Nm: ' + res);
                } else {
                    correct++;
                }

                resBn = BigNum.minus(val1, val2);
                resBnInt = BigNum.toInt(resBN);
                res = val1 - val2;

                if(resBNInt !== res) {
                    console.log('!!! ' + val1 + ' - ' + val2);
                    console.log('   BN: ' + resBNInt);
                    console.log('   Nm: ' + res);
                } else {
                    correct++;
                }

                resBn = BigNum.divide(val1, val2);
                resBnInt = Math.round(resBN, 4);
                res = Math.round(val1 / val2, 4);

                if(resBNInt !== res) {
                    console.log('!!! ' + val1 + ' / ' + val2);
                    console.log('   BN: ' + resBNInt);
                    console.log('   Nm: ' + res);
                } else {
                    correct++;
                }

                resBn = BigNum.more(val1, val2);
                res = val1 > val2;

                if(resBN !== res) {
                    console.log('!!! ' + val1 + ' > ' + val2);
                    console.log('   BN: ' + resBN);
                    console.log('   Nm: ' + res);
                } else {
                    correct++;
                }

                resBn = BigNum.less(val1, val2);
                res = val1 < val2;

                if(resBN !== res) {
                    console.log('!!! ' + val1 + ' < ' + val2);
                    console.log('   BN: ' + resBN);
                    console.log('   Nm: ' + res);
                } else {
                    correct++;
                }

                val1 = BigNum.rand(-99999999, 99999999);
                val2 = BigNum.rand(-9999999, 9999999);

                resBn = BigNum.multiply(val1, val2);
                resBnInt = BigNum.toInt(resBN);
                res = Math.round(val1 * val2, 4);

                if(resBNInt !== res) {
                    console.log('!!! ' + val1 + ' * ' + val2);
                    console.log('   BN: ' + resBNInt);
                    console.log('   Nm: ' + res);
                } else {
                    correct++;
                }

                resBn = BigNum.equal(val1, val2);
                res = val1 === val2;

                if(resBN !== res) {
                    console.log('!!! ' + val1 + ' === ' + val2);
                    console.log('   BN: ' + resBN);
                    console.log('   Nm: ' + res);
                } else {
                    correct++;
                }

                resBn = BigNum.equal(val1, val1);
                res = val1 === val1;

                if(resBN !== res) {
                    console.log('!!! ' + val1 + ' === ' + val1);
                    console.log('   BN: ' + resBN);
                    console.log('   Nm: ' + res);
                } else {
                    correct++;
                }

            }
            console.log('correct:' + correct);

        },

        runTimeTests: function timeTests(count = 10000, ranks = 15) {

            var max = Math.pow(10, ranks);

            var values = [];
            for(var i = 0; i < count; i++) {
                var val1 = BigNum.rand(-max, max);
                var val2 = BigNum.rand(-max, max);

                values.push([val1, val2]);
            }

            var testF = function (funcs, operation) {
                var results = [];
                for(var f = 0; f < 2; f++) {
                    var func = funcs[f];
                    var t = performance.now();
                    for(var i = 0; i < count; i++) {
                        res = func(values[i][0], values[i][1]);
                    }
                    results[f] =  Math.floor(performance.now() - t);
                }

                console.log('test ' + operation + ': diff ' + (results[1] - results[0]));
            }

            var testsFuncs = {
                plus: [
                    (val1, val2) => val1 + val2,
            (val1, val2) => BigNum.plus(val1, val2),
        ],

            minus: [
                (val1, val2) => val1 - val2,
                (val1, val2) => BigNum.minus(val1, val2),
        ],

            divide: [
                (val1, val2) => val1 / val2,
                (val1, val2) => BigNum.divide(val1, val2),
        ],

            miltiply: [
                (val1, val2) => val1 * val2,
                (val1, val2) => BigNum.multiply(val1, val2),
        ],
        };

            for(k in testsFuncs) {
                testF(testsFuncs[k], k);
            }
        },*/

    limit: 10000000,
    limit2: 100000000000000,
}
var run = 1;

if(run) {
    // var prices = [];
    // for (var i = 0; i < 200000; i++) {
    //     prices.push(500000000 + i);
    // }

    var money = BigNum.getBig(readline().split(' ')[1]);
    var prices = readline().split(' ').map(v=>+v);

    var roundSum, newRoundSum, sweeties = 0;

    do {
        roundSum = 0;

        var pricesSet = [];
        for (var i = 0; i < prices.length; i++) {
            var v = prices[i];
            newRoundSum = BigNum.plus(roundSum, v);

            if (BigNum.more(newRoundSum, money)) {
                continue;
            }

            roundSum = newRoundSum
            pricesSet.push(v);
        }

        prices = pricesSet;

        if (!roundSum) break;

        var fullRounds = Math.floor(BigNum.divide(money, roundSum));
        var spentMoney = BigNum.multiply(fullRounds, roundSum);

        sweeties += fullRounds * prices.length;
        money = BigNum.minus(money, spentMoney);

        if (!money) break;
    } while (true)

    print(sweeties);
}