{"trustable":false,"sections":[{"title":"","value":{"format":"HTML","content":"\n \u003cdiv class\u003d\"problem_par\"\u003e\n \u003cdiv class\u003d\"problem_par_normal\"\u003e\n At the end of the previous semester the students of the Department of Mathematics and Mechanics of the Yekaterinozavodsk State University had to take an exam in network technologies. \u003ci\u003eN\u003c/i\u003e professors discussed the curriculum and decided that there would be exactly \u003ci\u003eN\u003c/i\u003e\u003csup\u003e2\u003c/sup\u003e labs, the first professor would hold labs with numbers 1, \u003ci\u003eN\u003c/i\u003e\u0026nbsp;+\u0026nbsp;1, 2\u003ci\u003eN\u003c/i\u003e\u0026nbsp;+\u0026nbsp;1, …, \u003cnobr\u003e\u003ci\u003eN\u003c/i\u003e\u003csup\u003e2\u003c/sup\u003e − \u003ci\u003eN\u003c/i\u003e + 1\u003c/nobr\u003e, the second one\u0026nbsp;— labs with numbers 2, \u003ci\u003eN\u003c/i\u003e\u0026nbsp;+\u0026nbsp;2, 2\u003ci\u003eN\u003c/i\u003e\u0026nbsp;+\u0026nbsp;2, …, \u003cnobr\u003e\u003ci\u003eN\u003c/i\u003e\u003csup\u003e2\u003c/sup\u003e − \u003ci\u003eN\u003c/i\u003e + 2\u003c/nobr\u003e, etc. \u003ci\u003eN\u003c/i\u003e-th professor would hold labs with numbers \u003ci\u003eN\u003c/i\u003e, 2\u003ci\u003eN\u003c/i\u003e, 3\u003ci\u003eN\u003c/i\u003e, …, \u003ci\u003eN\u003c/i\u003e\u003csup\u003e2\u003c/sup\u003e. The professors remembered that during the last years lazy students didn\u0027t attend labs and as a result got bad marks at the exam. So they decided that a student would be admitted to the exam only if he would attend at least one lab of each professor.\n \u003c/div\u003e\n \u003c/div\u003e\n \u003cdiv class\u003d\"problem_par\"\u003e\n \u003cdiv class\u003d\"problem_par_normal\"\u003e\n \u003ci\u003eN\u003c/i\u003e roommates didn\u0027t know the number of labs and professors in this semester. These students had different diligence: the first student attended all labs, the second one\u0026nbsp;— only labs which numbers were a multiple of two, the third one\u0026nbsp;— only labs which numbers were a multiple of three, etc… At the end of the semester it turned out that only \u003ci\u003eK\u003c/i\u003e of these students were admitted to the exam. Find the minimal \u003ci\u003eN\u003c/i\u003e which makes that possible.\n \u003c/div\u003e\n \u003c/div\u003e\n\u003cbr\u003e\n 在上学期结束时,叶卡捷琳诺扎沃茨克国立大学数学与力学系的学生必须参加网络技术考试。 N 位教授讨论了课程并决定将有 N^2 个实验,第一位教授将拥有编号为 1、N + 1、2N + 1、...、N^2 - N + 1 的实验,第二位教授将拥有编号为 2, N + 2, 2N + 2, ..., N^2 − N + 2 的实验。第 N 位教授将拥有编号为 N、2N、3N、...、N^2 的实验。\n\u003cbr\u003e\n教授们记得,在过去的几年里,懒惰的学生没有参加实验,因此在考试中成绩不佳。因此,他们决定只有参加了每位教授至少一个实验的情况下,才能让学生参加考试。\n\u003cbr\u003e\nN个室友不知道这个学期有多少实验和教授。这些学生的勤奋程度不同:第一个学生参加了所有的实验室,第二个学生——只参加了数字是 2 的倍数的实验室,第三个学生——只参加了数字是 3 的倍数的实验室,等等……在学期结束时,原来,这些学生中只有 K 人被允许参加考试。请你找到使这成为可能的最小 N。"}},{"title":"Input","value":{"format":"HTML","content":"\n \u003cdiv class\u003d\"problem_par\"\u003e\n \u003cdiv class\u003d\"problem_par_normal\"\u003e\n An integer \u003ci\u003eK\u003c/i\u003e \u003cnobr\u003e(1 ≤ \u003ci\u003eK\u003c/i\u003e ≤ 2·10\u003csup\u003e9\u003c/sup\u003e)\u003c/nobr\u003e.\n \u003c/div\u003e\n \u003c/div\u003e\n "}},{"title":"Output","value":{"format":"HTML","content":"\n \u003cdiv class\u003d\"problem_par\"\u003e\n \u003cdiv class\u003d\"problem_par_normal\"\u003e\n Output the minimal possible \u003ci\u003eN\u003c/i\u003e which satisfies the problem statement. If there is no \u003ci\u003eN\u003c/i\u003e for which exactly \u003ci\u003eK\u003c/i\u003e students would be admitted to the exam, output 0.\n \u003c/div\u003e\n \u003c/div\u003e\n "}},{"title":"Sample 1","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\u003e8\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e15\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"Sample 2","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\u003e3\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e0\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}