{"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因為重彥實在是太喜歡吃火雞肉飯了,他跟他最喜歡火雞肉飯店家購買了數張的火雞肉飯券。火雞肉飯券上印著流水編號,重彥每次購買的火雞肉飯券都是連號的。舉例來說,若重彥這次買了4張火雞肉飯券,且其中流水號最小的一張其號碼為3,則這4張火雞肉飯券的流水編號就是3、4、5、6。\u003c/p\u003e\n\u003cp\u003e每次重彥想吃火雞肉飯時,他就使用所有火雞肉飯券中編號最小的一張去兌換一碗火雞肉飯。有天,重彥的好朋友——譽求來到了重彥家,譽求也是火雞肉飯的愛好者,看到重彥家中一大疊的火雞肉飯券,欲求不滿的譽求偷偷拿走了幾張。幾天後譽求搭著客運(不是捷運)離開時,重彥赫然發現他的火雞肉飯券似乎少了幾張!\u003c/p\u003e\n\u003cp\u003e重彥將所有火雞肉飯券上的流水編號一一列出,請你幫著急的想吃火雞肉飯的重彥看看,他的火雞肉飯券至少被偷走了幾張吧!\u003c/p\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003e輸入的第一行包含一整數\u003cb\u003en\u003c/b\u003e,代表重彥剩下的火雞肉飯券張數。\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,分別以一個空白隔開,代表重彥剩下的火雞肉飯券的流水編號。\u003c/p\u003e\n\u003cp\u003e\n\u003cli\u003e1 ≤ \u003cb\u003en\u003c/b\u003e ≤ 1000\u003c/li\u003e\n\u003cli\u003e\u003cb\u003ea\u003csub\u003ei\u003c/sub\u003e\u003c/b\u003e ≤ 10\u003csup\u003e9\u003c/sup\u003e\u003c/li\u003e\n\u003cli\u003e∀ \u003cb\u003ei\u003c/b\u003e ≠ \u003cb\u003ej\u003c/b\u003e, \u003cb\u003ea\u003csub\u003ei\u003c/sub\u003e\u003c/b\u003e ≠ \u003cb\u003ea\u003csub\u003ej\u003c/sub\u003e\u003c/b\u003e\u003c/li\u003e\n\u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003e請輸出一行,包含一整數,代表重彥至少被偷走的火雞肉飯券數量。\u003c/p\u003e"}},{"title":"Sample Input 1","value":{"format":"HTML","content":"\u003cpre\u003e4\n10 13 12 8\n\u003c/pre\u003e"}},{"title":"Sample Output 1","value":{"format":"HTML","content":"\u003cpre\u003e2\n\u003c/pre\u003e"}},{"title":"Sample Input 2","value":{"format":"HTML","content":"\u003cpre\u003e5\n7 5 6 4 8\n\u003c/pre\u003e"}},{"title":"Sample Output 2","value":{"format":"HTML","content":"\u003cpre\u003e0\n\u003c/pre\u003e"}}]}