Triangle Counting#8616

Triangle Counting

1 second
128 megabytes
Easy

You are given rods with lengths 1, 2, \dots, n. You may choose any three of them to form a triangle. How many distinct triangles can be formed? Two triangles are considered different if there exists at least one pair of corresponding sides with different lengths.

Input

Each line contains one integer n~(3 \le n \le 10^6). The last line contains a value n < 3 and should not be processed.

Output

For each test case, print on a separate line the number of distinct triangles that can be formed.

Examples

Example 1

Loading
Loading