{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003e\u003cimg src\u003d\"https://static.e-olymp.com/content/7f/7ffaea86af91fcb4a919a30935a8630004c0f345.gif\" /\u003e\u003c/p\u003e\n\n\u003cp\u003eConsider a positive integer \u003cstrong\u003eN\u003c/strong\u003e. Let \u003cstrong\u003eA\u003c/strong\u003e, \u003cstrong\u003eB\u003c/strong\u003e and \u003cstrong\u003eC\u003c/strong\u003e be non-negative integers, such that \u003cstrong\u003eA\u003c/strong\u003e+\u003cstrong\u003eB\u003c/strong\u003e+\u003cstrong\u003eC\u003c/strong\u003e\u003d\u003cstrong\u003eN\u003c/strong\u003e. Let there be \u003cstrong\u003eN\u003c/strong\u003e marked points on a line with an equal distance between neighboring ones. Draw lines at an angle of 45 degrees through the leftmost \u003cstrong\u003eA\u003c/strong\u003e points, draw lines at an angle of 90 degrees through the next B points, and at an angle of \u003cstrong\u003e135\u003c/strong\u003e degrees -- through the last \u003cstrong\u003eC\u003c/strong\u003e points. These lines will intersect in some of points.\u003c/p\u003e\n\n\u003cp\u003eFor clarity look at the image, where \u003cstrong\u003eN\u003c/strong\u003e\u003d5, \u003cstrong\u003eA\u003c/strong\u003e\u003d1, \u003cstrong\u003eB\u003c/strong\u003e\u003d2, \u003cstrong\u003eC\u003c/strong\u003e\u003d2. There are 6 points of intersection.\u003c/p\u003e\n\n\u003cp\u003eYour task is quite simple -- for given \u003cstrong\u003eN\u003c/strong\u003e you are to count the sum of quantities of intersection points for all possible triples \u003cstrong\u003eA\u003c/strong\u003e, \u003cstrong\u003eB\u003c/strong\u003e, \u003cstrong\u003eC\u003c/strong\u003e\u003c/p\u003e\n\n.\n\n\u003cp\u003e\u003ch2\u003eInput\u003c/h2\u003e\u003c/p\u003e\n\n\u003cp\u003eFirst line of input contains the quantity of tests \u003cstrong\u003eT\u003c/strong\u003e (\u003cstrong\u003e1\u003c/strong\u003e ≤ \u003cstrong\u003eT\u003c/strong\u003e ≤ \u003cstrong\u003e1000\u003c/strong\u003e).\u003c/p\u003e\n\n\u003cp\u003eEach of the next \u003cstrong\u003eT\u003c/strong\u003e lines contains an integer \u003cstrong\u003eN\u003c/strong\u003e (\u003cstrong\u003e2\u003c/strong\u003e ≤ \u003cstrong\u003eN\u003c/strong\u003e ≤ \u003cstrong\u003e10^6\u003c/strong\u003e) -- the quantity of points on the line in a current test.\u003c/p\u003e\n\n\u003cp\u003e\u003ch2\u003eOutput\u003c/h2\u003e\u003c/p\u003e\n\n\u003cp\u003eOutput \u003cstrong\u003eT\u003c/strong\u003e lines of the form “Case #\u003cstrong\u003eA\u003c/strong\u003e: \u003cstrong\u003eB\u003c/strong\u003e”, where \u003cstrong\u003eA\u003c/strong\u003e is the number of test (beginning from 1), \u003cstrong\u003eB\u003c/strong\u003e is the sum of quantities of intersection points for given \u003cstrong\u003eN\u003c/strong\u003e.\u003c/p\u003e\n\n"}},{"title":"Example","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\n2\n3\n5\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eCase #1: 3\nCase #2: 13\nCase #3: 91\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}