404455: GYM101510 A Art

Memory Limit:512 MB Time Limit:2 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

A. Arttime limit per test2 secondsmemory limit per test512 megabytesinputstandard inputoutputstandard output

Vera has five sticks of distinct lengths l1, l2, l3, l4, l5. Vera may choose any three of the five sticks to form the sides of a triangle. How many different triangles can Vera make? Each triangle must have positive area and sticks cannot be bent or cut.

Input

Line 1 contains integers l1, l2, l3, l4, l5 (1 ≤ li ≤ 1000).

Output

Print one line with one integer, the number of ways to form a triangle.

ExamplesInput
1 2 3 4 5
Output
3
Input
1 2 4 8 16
Output
0
Note

For the first example, the 3 ways to form a triangle are choosing sticks 2, 3, 4 or 2, 4, 5 or 3, 4, 5.

加入题单

算法标签: