Problem F: 数数

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:19 Solved:6

Description

Sample Input Copy

5
3  2  5  3  4

Sample Output Copy

8

HINT

样例说明:

可以选择的编号的方案是:(1, 2, 4),(1, 2, 5),(1, 3, 4),(1, 3, 5),(1, 4, 5),(2, 3, 5),(2, 4, 5),(3, 4, 5)。