{"trustable":false,"prependHtml":"\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 async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS-MML_HTMLorMML\" type\u003d\"text/javascript\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"HTML","content":"一队人,编号从前到后为2, 3, 4, 5, .....\n\u003cbr\u003e\n第一次,编号为2的人出队可以去玩了,然后,他后面每隔一个人必须去洗碗,出去玩的和去洗碗的都出队,队列里剩下的人为3, 5, 7, 9, ...\u003cbr\u003e\n第二次,编号为3的人去玩,他后面的人中每隔一个人必须去洗碗,队列里剩下的人为5, 7, 11, 13,...\n\u003cbr\u003e\n这样一直处理,可以去玩的人都是lucky的,找出第n个lucky number。\n"}},{"title":"Input","value":{"format":"HTML","content":"The input contains several test cases. Each test case consists of an integer n. You may assume that 1 \u0026lt;\u003d n \u0026lt;\u003d 3000. A zero follows the input for the last test case. \u003cbr\u003e"}},{"title":"Output","value":{"format":"HTML","content":"For each test case specified by n output on a single line the n-th lucky number. \u003cbr\u003e"}},{"title":"Sample","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\u003e\u003cpre\u003e1\n2\n10\n20\n0\n\u003c/pre\u003e\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e\u003cpre\u003e2\n3\n29\n83\n\u003c/pre\u003e\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}