{"trustable":true,"prependHtml":"\u003cstyle type\u003d\u0027text/css\u0027\u003e\n .input, .output {\n border: 1px solid #888888;\n }\n .output {\n margin-bottom: 1em;\n position: relative;\n top: -1px;\n }\n .output pre, .input pre {\n background-color: #EFEFEF;\n line-height: 1.25em;\n margin: 0;\n padding: 0.25em;\n }\n \u003c/style\u003e\n \u003clink rel\u003d\"stylesheet\" href\u003d\"//codeforces.org/s/96598/css/problem-statement.css\" type\u003d\"text/css\" /\u003e\n\u003cscript\u003e\n window.katexOptions \u003d {\n delimiters: [\n {left: \u0027$$$$$$\u0027, right: \u0027$$$$$$\u0027, display: true},\n {left: \u0027$$$\u0027, right: \u0027$$$\u0027, display: false},\n {left: \u0027$$\u0027, right: \u0027$$\u0027, display: true},\n {left: \u0027$\u0027, right: \u0027$\u0027, display: false}\n ]\n };\n\u003c/script\u003e\n","sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003eXXI 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.\u003c/p\u003e\u003cp\u003ePolycarp has decided to spend at most $$$T$$$ burles at the fair. However, he has some plan in mind for his path across the booths:\u003c/p\u003e\u003cul\u003e \u003cli\u003e at first, he visits booth number $$$1$$$; \u003c/li\u003e\u003cli\u003e if he has enough burles to buy \u003cspan class\u003d\"tex-font-style-bf\"\u003eexactly one\u003c/span\u003e candy from the current booth, then he buys it immediately; \u003c/li\u003e\u003cli\u003e then he proceeds to the next booth in the clockwise order (regardless of if he bought a candy or not). \u003c/li\u003e\u003c/ul\u003e\u003cp\u003ePolycarp\u0027s money is finite, thus the process will end once he can no longer buy candy at any booth.\u003c/p\u003e\u003cp\u003eCalculate the number of candies Polycarp will buy.\u003c/p\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003eThe 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.\u003c/p\u003e\u003cp\u003eThe 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$$$.\u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003ePrint a single integer — the total number of candies Polycarp will buy.\u003c/p\u003e"}},{"title":"Examples","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e3 38\n5 2 5\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e10\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e5 21\n2 4 100 2 6\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e6\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"Note","value":{"format":"HTML","content":"\u003cp\u003eLet\u0027s consider the first example. Here are Polycarp\u0027s moves until he runs out of money:\u003c/p\u003e\u003col\u003e \u003cli\u003e Booth $$$1$$$, buys candy for $$$5$$$, $$$T \u003d 33$$$; \u003c/li\u003e\u003cli\u003e Booth $$$2$$$, buys candy for $$$2$$$, $$$T \u003d 31$$$; \u003c/li\u003e\u003cli\u003e Booth $$$3$$$, buys candy for $$$5$$$, $$$T \u003d 26$$$; \u003c/li\u003e\u003cli\u003e Booth $$$1$$$, buys candy for $$$5$$$, $$$T \u003d 21$$$; \u003c/li\u003e\u003cli\u003e Booth $$$2$$$, buys candy for $$$2$$$, $$$T \u003d 19$$$; \u003c/li\u003e\u003cli\u003e Booth $$$3$$$, buys candy for $$$5$$$, $$$T \u003d 14$$$; \u003c/li\u003e\u003cli\u003e Booth $$$1$$$, buys candy for $$$5$$$, $$$T \u003d 9$$$; \u003c/li\u003e\u003cli\u003e Booth $$$2$$$, buys candy for $$$2$$$, $$$T \u003d 7$$$; \u003c/li\u003e\u003cli\u003e Booth $$$3$$$, buys candy for $$$5$$$, $$$T \u003d 2$$$; \u003c/li\u003e\u003cli\u003e Booth $$$1$$$, buys no candy, not enough money; \u003c/li\u003e\u003cli\u003e Booth $$$2$$$, buys candy for $$$2$$$, $$$T \u003d 0$$$. \u003c/li\u003e\u003c/ol\u003e\u003cp\u003eNo candy can be bought later. The total number of candies bought is $$$10$$$.\u003c/p\u003e\u003cp\u003eIn the second example he has $$$1$$$ burle left at the end of his path, no candy can be bought with this amount.\u003c/p\u003e"}}]}