{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"\u003chtml\u003e\n \u003chead\u003e\u003c/head\u003e\n \u003cbody\u003e\n \u003cdiv\u003e\n \u003cspan style\u003d\"font-family: Tahoma; \"\u003e\u0026nbsp; \u0026nbsp; Palindromic numbers are digital strings that read the same both forwards and backwards. For example, 121, 44 and 3 are Palindromic numbers, 175, 36 are not;\u003c/span\u003e\n \u003cbr style\u003d\"font-family: Tahoma; \"\u003e \n \u003cbr style\u003d\"font-family: Tahoma; \"\u003e \n \u003cspan style\u003d\"font-family: Tahoma; \"\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;For a given integer N, you are to find a palindromic number P that satisfy P\u0026gt;N. However, there are many such palindromic numbers. Your task is to find the least one.\u003c/span\u003e\n \u003c/div\u003e \n \u003cdiv\u003e\u003c/div\u003e \n \u003cp\u003e\u003c/p\u003e \n \u003cp class\u003d\"p0\" style\u003d\"margin-bottom:0pt; margin-top:0pt; \"\u003e\u003cspan style\u003d\"mso-spacerun:\u0027yes\u0027; font-size:10.5000pt; font-family:\u0027Arial CE\u0027; \"\u003e\n \u003co:p\u003e\u003c/o:p\u003e\u003c/span\u003e\u003c/p\u003e\n \u003c/body\u003e\n\u003c/html\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003chtml\u003e\n \u003chead\u003e\u003c/head\u003e\n \u003cbody\u003e\n \u003cdiv\u003e\n \u003cspan style\u003d\"font-family: Tahoma; \"\u003e\u0026nbsp; \u0026nbsp; There are several test cases, each test case contains only one positive integer N in one line. The number of digits of N is not exceeding 10,000, and N has not lead zeroes.\u003c/span\u003e\n \u003cbr style\u003d\"font-family: Tahoma; \"\u003e \n \u003cspan style\u003d\"font-family: Tahoma; \"\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;The input will finish with the end of file.\u003c/span\u003e\n \u003c/div\u003e \n \u003cdiv\u003e\u003c/div\u003e \n \u003cdiv\u003e\u003c/div\u003e\n \u003c/body\u003e\n\u003c/html\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003chtml\u003e\n \u003chead\u003e\u003c/head\u003e\n \u003cbody\u003e\n \u003cdiv\u003e\n \u003cspan style\u003d\"font-family: Tahoma; \"\u003e\u0026nbsp; \u0026nbsp; For each the case, your program will output the least palindromic number P (P \u0026gt; N) on separate line.\u003c/span\u003e\n \u003c/div\u003e \n \u003cdiv\u003e\u003c/div\u003e\n \u003c/body\u003e\n\u003c/html\u003e"}},{"title":"Sample Input","value":{"format":"HTML","content":"\u003cpre\u003e44\r\n3\r\n175\u003c/pre\u003e"}},{"title":"Sample Output","value":{"format":"HTML","content":"\u003cpre\u003e55\r\n4\r\n181\u003c/pre\u003e"}},{"title":"Hint","value":{"format":"HTML","content":"\u003chtml\u003e\n \u003chead\u003e\u003c/head\u003e\n \u003cbody\u003e\u003c/body\u003e\n\u003c/html\u003e"}}]}