{"trustable":false,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003e\r\n\tA quadrilateral is a simple geometric shape. The formal definition of Quadrilateral for this problem can be given as\u003c/p\u003e\r\n\u003cp align\u003d\"center\"\u003e\r\n\t\u003cem\u003e\u0026ldquo;A quadrilateral is a simple polygon with four sides, having a strictly positive area.\u0026rdquo;\u003c/em\u003e\u003c/p\u003e\r\n\u003cp\u003e\r\n\t\u003cimg align\u003d\"left\" height\u003d\"253\" hspace\u003d\"12\" src\u003d\"http://acmicpc-live-archive.uva.es/nuevoportal/data/p5001.jpg\" width\u003d\"253\" /\u003eIf you are given four rods made of steel and having integer length, you may or may not be able to make a quadrilateral with it. For example you cannot make a quadrilateral with four rods of length 4, 5, 8 and 17 units but you can make a quadrilateral with four rods of length 2, 3, 4 and 5 units respectively. Now you have to supply n rods to the Architecture department of a University. But the University authority has asked you to make the length of the rods such that no four of them can be used to make a Quadrilateral. They are afraid that if the students can make such shapes then they will use up some of the rods in the sculptures they make. Given the value of n, what is the minimum possible length of the longest rod? You can assume that:\u003c/p\u003e\r\n\u003col\u003e\r\n\t\u003cli\u003e\r\n\t\tOnly one rod has to be used as one side of the Quadrilateral.\u003c/li\u003e\r\n\t\u003cli\u003e\r\n\t\tA rod cannot be divided into two smaller pieces.\u003c/li\u003e\r\n\t\u003cli\u003e\r\n\t\tTwo or more rods cannot be joined to make a longer rod.\u003c/li\u003e\r\n\u003c/ol\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003e\r\n\tThe input file contains around 100 line of input. Each line contains an integer, which denotes the value of n (3\u0026lt;n\u0026lt;61). A line containing a 0 (zero) terminates the input.\u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003e\r\n\tFor each line of input produce one line of output. This line contains serial of output followed by a decimal integer that denotes the shortest possible length of longest rod. You can safely assume that this length will fit in a 64-bit signed integer. Look at the output for sample input for details.\u003c/p\u003e"}},{"title":"Sample Input","value":{"format":"HTML","content":"\u003cp\u003e\r\n\t4\u003cbr /\u003e\r\n\t6\u003cbr /\u003e\r\n\t0\u003c/p\u003e"}},{"title":"Sample Output","value":{"format":"HTML","content":"\u003cp\u003e\r\n\tCase 1: 3\u003cbr /\u003e\r\n\tCase 2: 9\u003c/p\u003e"}},{"title":"Hint","value":{"format":"HTML","content":"\u003cp\u003e\r\n\tIllustration of first Sample Input: If you have four sticks of length 1, 1, 1 and 3 then you cannot make a quadrilateral with them. So when n\u003d4, the minimum possible length of the longest rod is 3.\u003c/p\u003e"}}]}