{"trustable":false,"prependHtml":"\u003cstyle type\u003d\"text/css\"\u003e\n section pre {\n display: block;\n padding: 9.5px;\n margin: 0 0 10px;\n font-size: 13px;\n line-height: 1.42857143;\n word-break: break-all;\n word-wrap: break-word;\n color: #333;\n background: rgba(255, 255, 255, 0.5);\n border: 1px solid #ccc;\n border-radius: 6px;\n }\n\u003c/style\u003e\n\u003cscript\u003e\n window.katexOptions \u003d {\n delimiters: [\n {left: \u0027\\\\(\u0027, right: \u0027\\\\)\u0027, display: false},\n {left: \u0027\\\\[\u0027, right: \u0027\\\\]\u0027, display: true}\n ]\n };\n\u003c/script\u003e\n","sections":[{"title":"Problem Statement","value":{"format":"HTML","content":"\u003cp\u003e\u003cb\u003eTahmid\u003c/b\u003e loves number.But for some reason he always gets \u003cb\u003eWA\u003c/b\u003e.So help him getting an \u003cb\u003eAc\u003c/b\u003e.\u003c/p\u003e\n\u003cp\u003eso let\u0027s read the problem first:\u003c/p\u003e\n\u003cp\u003eInteger \u003cb\u003eX\u003c/b\u003e and an integer sequence of length \u003cb\u003eN\u003c/b\u003e:p\u003csub\u003e1\u003c/sub\u003e,.....,p\u003csub\u003eN\u003c/sub\u003e are given.\u003c/p\u003e\n\u003cp\u003eAmong the integers not contained in the sequence p\u003csub\u003e1\u003c/sub\u003e,.....,p\u003csub\u003eN\u003c/sub\u003e\u003cb\u003e(not necessarily positive)\u003c/b\u003e,find the integer nearest to \u003cb\u003eX\u003c/b\u003e that is,find the integer whose absolute difference with \u003cb\u003eX\u003c/b\u003e is the minimum.If there are multiple such integers,report the smallest such integer.\u003c/p\u003e\n"}},{"title":"Constraints","value":{"format":"HTML","content":"\u003cp\u003e\u003cb\u003e#\u003c/b\u003e 1\u003cu\u003e\u003c\u003c/u\u003e\u003cb\u003eX\u003c/b\u003e\u003cu\u003e\u003c\u003c/u\u003e100\u003c/p\u003e\n\u003cp\u003e\u003cb\u003e#\u003c/b\u003e 0\u003cu\u003e\u003c\u003c/u\u003e\u003cb\u003eN\u003c/b\u003e\u003cu\u003e\u003c\u003c/u\u003e100\u003c/p\u003e\n\u003cp\u003e\u003cb\u003e#\u003c/b\u003e 1\u003cu\u003e\u003c\u003c/u\u003e\u003cb\u003ep\u003csub\u003ei\u003c/sub\u003e\u003c/b\u003e\u003cu\u003e\u003c\u003c/u\u003e100\u003c/p\u003e\n\u003cp\u003ep\u003csub\u003e1\u003c/sub\u003e,....,p\u003csub\u003eN\u003c/sub\u003eare all distinct.\u003c/p\u003e\n \u003cp\u003eAll values in input are integers.\u003c/p\u003e\n"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003eInput is given from Standard Input in the following format:\u003c/p\u003e\n\u003cP\u003e\u003cb\u003eX\u003c/b\u003e \u003cb\u003eN\u003c/b\u003e\u003c/p\u003e\n\u003cp\u003ep\u003csub\u003e1\u003c/sub\u003e,........,p\u003csub\u003eN\u003c/sub\u003e\u003c/p\u003e\n"}},{"title":"Output","value":{"format":"HTML","content":"\u003ch3\u003e\u003c/h3\u003e\n\u003cp\u003ePrint the answer.\u003c/p\u003e"}},{"title":"Sample Input 1","value":{"format":"HTML","content":"\u003ch3\u003e\u003c/h3\u003e\n\u003cpre\u003e6 5\n4 7 10 6 5\n\u003c/pre\u003e"}},{"title":"Sample Output 1","value":{"format":"HTML","content":"\u003ch3\u003e\u003c/h3\u003e\n\u003cpre\u003e8\n\u003c/pre\u003e \n\u003cp\u003eAmong the integers not contained in the sequence \u003cvar\u003e(4, 7, 10, 6, 5)\u003c/var\u003e, the one nearest to \u003cvar\u003e(6)\u003c/var\u003e is \u003cvar\u003e(8)\u003c/var\u003e.\u003c/p\u003e"}},{"title":"Sample Input 2","value":{"format":"HTML","content":"\u003ch3\u003e\u003c/h3\u003e\n\u003cpre\u003e10 5\n4 7 10 6 5\n\u003c/pre\u003e"}},{"title":"Sample Output 2","value":{"format":"HTML","content":"\u003ch3\u003e\u003c/h3\u003e\n\u003cpre\u003e9\n\u003c/pre\u003e \n\u003cp\u003eAmong the integers not contained in the sequence \u003cvar\u003e(4, 7, 10, 6, 5)\u003c/var\u003e, the ones nearest to \u003cvar\u003e(10)\u003c/var\u003e are \u003cvar\u003e(9)\u003c/var\u003e and \u003cvar\u003e(11)\u003c/var\u003e. We should print the smaller one, \u003cvar\u003e(9)\u003c/var\u003e.\u003c/p\u003e"}},{"title":"Sample Input 3","value":{"format":"HTML","content":"\u003ch3\u003e\u003c/h3\u003e\n\u003cpre\u003e100 0\n\n\u003c/pre\u003e"}},{"title":"Sample Output 3","value":{"format":"HTML","content":"\u003ch3\u003e\u003c/h3\u003e\n\u003cpre\u003e100\n\u003c/pre\u003e \n\u003cp\u003eWhen \u003cvar\u003e(N \u003d 0)\u003c/var\u003e, the second line in the input will be empty. Also, as seen here, \u003cvar\u003e(X)\u003c/var\u003e itself can be the answer.\u003c/p\u003e"}}]}