1442 - [Poi2006]Crystal

Input

每一行给出数字N,2<=N<=50 下面一行给出N个数字.每个数字在[1,2^32-1]

Output

Examples

Input

3
2 1 3

Output

5
And the following are every possible numbers of atoms of each particular element:
(0, 1, 1), (1, 0, 1), (1, 1, 0), (2, 0, 2), (2, 1, 3).
Time Limit 1 second
Memory Limit 128 MB
Discuss Stats
上一题 下一题