372 - Make Triangles
Make Triangles
Time Limit: 1 sec
The Problem
Let’s make Triangles. You have N rods.
Your task is to find how many different triangles can you make from these rods??
The Input
The Input file contains several lines. Each line contains a single integer, number of rods N (3<=N <= 1000000). If N<3 the input will terminate.
The Output
For each line of input the output will print the number of triangles in a separate line. Remember all the answers strictly integer.
Sample Input
5
10
2
Sample Output
3
50
Problem Setter: Samia Safa Ahmed