Triangle Counting
Easy
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
You are given rods of length . You have to pick any three of them and build a triangle. How many distinct triangles can you make? Note that, two triangles will be considered different if they have at least one pair of arms with different length.
Input
Each line has one positive integer . The end of input will be indicated by a case with . This case should not be processed.
Output
For each test case, print the number of distinct triangles you can make.
Examples
Input #1
Answer #1
Submissions 888
Acceptance rate 25%