输入的第一行包含一个整数 n 。
第二行包含 n 个整数 a1, a2, · · · an。
4 1 3 6 9
117
对于 30% 的数据,1 ≤ n ≤ 1000,1 ≤ ai ≤ 100。
对于所有评测用例,1 ≤ n ≤ 200000,1 ≤ ai ≤ 1000。
2680,2664,2681,2665,2682,2667,2683,26682680,2664,2681,2665,2682,2667,2683,26682680,2664,2681,2665,2682,2667,2683,26682680,2664,2681,2665,2682,2667,2683,26682680,2664,2681,2665,2682,2667,2683,26682680,2664,2681,2665,2682,2667,2683,2668