{"trustable":false,"sections":[{"title":"","value":{"format":"HTML","content":"\n\u003cp style\u003d\"text-align: justify;\"\u003e\u003cimg class\u003d\"media-image\" style\u003d\"float: right;\" src\u003d\"https://www.e-olymp.com/media/upload/media/1009/1256095304.GIF\" alt\u003d\"\" width\u003d\"255\" height\u003d\"242\"\u003e Consider 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\u003cp style\u003d\"text-align: justify;\"\u003e For 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\u003cp style\u003d\"text-align: justify;\"\u003e Your 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\u003cp\u003e.\u003c/p\u003e\n\u003cp style\u003d\"text-align: justify;\"\u003e\u003cstrong\u003eInput\u003c/strong\u003e\u003c/p\u003e\n\u003cp style\u003d\"text-align: justify;\"\u003e First 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\u003cp style\u003d\"text-align: justify;\"\u003e Each 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\u003csup\u003e6\u003c/sup\u003e\u003c/strong\u003e) – the quantity of points on the line in a current test.\u003c/p\u003e\n\u003cp style\u003d\"text-align: justify;\"\u003e\u003cstrong\u003e Output\u003c/strong\u003e\u003c/p\u003e\n\u003cp style\u003d\"text-align: justify;\"\u003e Output \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.\u003cbr\u003e\u003c/p\u003e"}},{"title":"Example 1","value":{"format":"HTML","content":"\u003cdiv class\u003d\"mdl-grid mdl-grid--no-spacing\"\u003e\n \u003cdiv class\u003d\"mdl-cell mdl-cell--6-col\"\u003e\n \u003cdiv class\u003d\"eo-label\"\u003e\n Input example\n \u003c/div\u003e\n \u003cpre class\u003d\"eo-code\"\u003e3\n2\n3\n5\u003c/pre\u003e\n \u003c/div\u003e\n \u003cdiv class\u003d\"mdl-cell mdl-cell--6-col\"\u003e\n \u003cdiv class\u003d\"eo-label\"\u003e\n Output example\n \u003c/div\u003e\n \u003cpre class\u003d\"eo-code\"\u003eCase #1: 3\nCase #2: 13\nCase #3: 91\u003c/pre\u003e\n \u003c/div\u003e\n\u003c/div\u003e"}}]}