{"trustable":false,"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\u003cscript\u003e window.katexOptions \u003d { disable: true }; \u003c/script\u003e\n\u003cscript type\u003d\"text/x-mathjax-config\"\u003e\n MathJax.Hub.Config({\n tex2jax: {\n inlineMath: [[\u0027$$$\u0027,\u0027$$$\u0027], [\u0027$\u0027,\u0027$\u0027]],\n displayMath: [[\u0027$$$$$$\u0027,\u0027$$$$$$\u0027], [\u0027$$\u0027,\u0027$$\u0027]]\n }\n });\n\u003c/script\u003e\n\u003cscript type\u003d\"text/javascript\" async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS_HTML-full\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003e傑森是一名癡情的男子漢,他愛上了一個美麗的女孩。她的名字,叫做「三井日立」,她有雙溫柔的眼睛,還悄悄偷走傑森的心。\u003c/p\u003e\n\u003cp\u003e傑森決定搬到三井日立所居住的社區,這個社區的房屋排列有個特色:所有的房子排成一橫列,且相鄰兩間房子的距離皆為10公尺。\u003c/p\u003e\n\u003cp\u003e已知此社區有\u003cb\u003en\u003c/b\u003e間房子,第\u003cb\u003ei\u003c/b\u003e間房子的價格為\u003cb\u003ea\u003csub\u003ei\u003c/sub\u003e\u003c/b\u003e,若\u003cb\u003ea\u003csub\u003ei\u003c/sub\u003e\u003c/b\u003e \u003e 0,則傑森可以購買第\u003cb\u003ei\u003c/b\u003e間房子;若\u003cb\u003ea\u003csub\u003ei\u003c/sub\u003e\u003c/b\u003e的值為0,則表示此房子已經有人居住,傑森不能購買。\u003c/p\u003e\n\u003cp\u003e傑森現在的預算有限,請幫助傑森計算,在不超過預算的情況下,能購買的房子能與三井日立多接近。\u003c/p\u003e\n"}},{"title":"INPUT","value":{"format":"HTML","content":"\u003cp\u003e輸入的第一行包含三整數\u003cb\u003en\u003c/b\u003e、\u003cb\u003em\u003c/b\u003e、\u003cb\u003ek\u003c/b\u003e(2 ≤ \u003cb\u003en\u003c/b\u003e ≤ 100, 1 ≤ \u003cb\u003em\u003c/b\u003e ≤ \u003cb\u003en\u003c/b\u003e, 1 ≤ \u003cb\u003ek\u003c/b\u003e ≤ 100),分別表示三井日立所居住的社區的房子數量、三井日立所居住的房子編號、傑森的預算。\u003c/p\u003e\n\u003cp\u003e第二行包含\u003cb\u003en\u003c/b\u003e個整數,依序表示\u003cb\u003ea\u003csub\u003e1\u003c/sub\u003e\u003c/b\u003e、\u003cb\u003ea\u003csub\u003e2\u003c/sub\u003e\u003c/b\u003e、……、\u003cb\u003ea\u003csub\u003en\u003c/sub\u003e\u003c/b\u003e(0 ≤ \u003cb\u003ea\u003csub\u003ei\u003c/sub\u003e\u003c/b\u003e ≤ 100)。\u003c/p\u003e\n\u003cp\u003e保證\u003cb\u003ea\u003csub\u003em\u003c/sub\u003e\u003c/b\u003e \u003d 0且傑森至少能購買一間房子。\u003c/p\u003e"}},{"title":"OUTPUT","value":{"format":"HTML","content":"\u003cp\u003e輸出一整數,表示傑森能購買的房子與三井日立最接近的距離。\u003c/p\u003e"}},{"title":"SAMPLE INPUT 1","value":{"format":"HTML","content":"\u003cfont face \u003d \"Courier New\"\u003e\u003cpre\u003e5 1 20\n0 27 32 21 19\n\u003c/pre\u003e\u003c/font\u003e"}},{"title":"SAMPLE OUTPUT 1","value":{"format":"HTML","content":"\u003cfont face \u003d \"Courier New\"\u003e\u003cpre\u003e40\n\u003c/pre\u003e\u003c/font\u003e"}},{"title":"SAMPLE INPUT 2","value":{"format":"HTML","content":"\u003cfont face \u003d \"Courier New\"\u003e\u003cpre\u003e7 3 50\n62 0 0 0 99 33 22\n\u003c/pre\u003e\u003c/font\u003e"}},{"title":"SAMPLE OUTPUT 2","value":{"format":"HTML","content":"\u003cfont face \u003d \"Courier New\"\u003e\u003cpre\u003e30\n\u003c/pre\u003e\u003c/font\u003e"}},{"title":"SAMPLE INPUT 3","value":{"format":"HTML","content":"\u003cfont face \u003d \"Courier New\"\u003e\u003cpre\u003e10 5 100\n1 0 1 0 0 0 0 0 1 1\n\u003c/pre\u003e\u003c/font\u003e"}},{"title":"SAMPLE OUTPUT 3","value":{"format":"HTML","content":"\u003cfont face \u003d \"Courier New\"\u003e\u003cpre\u003e20\n\u003c/pre\u003e\u003c/font\u003e"}}]}