1996 - [Hnoi2010]chorus 合唱队

Input

Output

Examples

Input

4
1701 1702 1703 1704

Output

8
时间限制 1 秒
内存限制 128 MB
统计
上一题 下一题